aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-05-07 10:47:28 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-05-07 10:47:28 +1200
commit1f7e9473e1bc0faff0feab20c5b5f801df285ba3 (patch)
tree851949c50a93b2e8b3481e828b9c8acc0e451f60 /src/org/traccar/BasePipelineFactory.java
parentcc66af4ff6887c9ce2f594e87d91cff87f11098e (diff)
downloadtrackermap-server-1f7e9473e1bc0faff0feab20c5b5f801df285ba3.tar.gz
trackermap-server-1f7e9473e1bc0faff0feab20c5b5f801df285ba3.tar.bz2
trackermap-server-1f7e9473e1bc0faff0feab20c5b5f801df285ba3.zip
Rename reset delay to timeout
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index c166f47f4..41053cde2 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -36,7 +36,7 @@ import java.net.InetSocketAddress;
public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private final TrackerServer server;
- private final int resetDelay;
+ private int timeout;
private FilterHandler filterHandler;
private DistanceHandler distanceHandler;
@@ -95,7 +95,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
public BasePipelineFactory(TrackerServer server, String protocol) {
this.server = server;
- resetDelay = Context.getConfig().getInteger(protocol + ".resetDelay", 0);
+ timeout = Context.getConfig().getInteger(protocol + ".timeout", 0);
+ if (timeout == 0) {
+ timeout = Context.getConfig().getInteger(protocol + ".resetDelay", 0); // temporary
+ }
if (Context.getConfig().getBoolean("filter.enable")) {
filterHandler = new FilterHandler();
@@ -126,8 +129,8 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
@Override
public ChannelPipeline getPipeline() {
ChannelPipeline pipeline = Channels.pipeline();
- if (resetDelay != 0) {
- pipeline.addLast("idleHandler", new IdleStateHandler(GlobalTimer.getTimer(), resetDelay, 0, 0));
+ if (timeout != 0) {
+ pipeline.addLast("idleHandler", new IdleStateHandler(GlobalTimer.getTimer(), timeout, 0, 0));
}
pipeline.addLast("openHandler", new OpenChannelHandler(server));
if (Context.isLoggerEnabled()) {