aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
commitca884b765f3f7a642c435be886dbec40f9d1f661 (patch)
treeeb809ffe38faaf6e580fc2434beb9c4e0b3f90e5 /src/main/java/org/traccar/BasePipelineFactory.java
parent63ecf80c11ec9bce19df18fc24ad863a9c2cb212 (diff)
downloadtrackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.gz
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.bz2
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.zip
Convert some config usages
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/main/java/org/traccar/BasePipelineFactory.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/BasePipelineFactory.java b/src/main/java/org/traccar/BasePipelineFactory.java
index 1f383f211..3eb7011a1 100644
--- a/src/main/java/org/traccar/BasePipelineFactory.java
+++ b/src/main/java/org/traccar/BasePipelineFactory.java
@@ -22,6 +22,7 @@ import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.timeout.IdleStateHandler;
+import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.handler.ComputedAttributesHandler;
import org.traccar.handler.CopyAttributesHandler;
@@ -58,12 +59,12 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private final String protocol;
private int timeout;
- public BasePipelineFactory(TrackerConnector connector, String protocol) {
+ public BasePipelineFactory(TrackerConnector connector, Config config, String protocol) {
this.connector = connector;
this.protocol = protocol;
- timeout = Context.getConfig().getInteger(Keys.PROTOCOL_TIMEOUT.withPrefix(protocol));
+ timeout = config.getInteger(Keys.PROTOCOL_TIMEOUT.withPrefix(protocol));
if (timeout == 0) {
- timeout = Context.getConfig().getInteger(Keys.SERVER_TIMEOUT);
+ timeout = config.getInteger(Keys.SERVER_TIMEOUT);
}
}