aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/BasePipelineFactory.java2
-rw-r--r--src/org/traccar/TrackerServer.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 41053cde2..6e350f61d 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -129,7 +129,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
@Override
public ChannelPipeline getPipeline() {
ChannelPipeline pipeline = Channels.pipeline();
- if (timeout != 0) {
+ if (timeout > 0 && !server.isConnectionless()) {
pipeline.addLast("idleHandler", new IdleStateHandler(GlobalTimer.getTimer(), timeout, 0, 0));
}
pipeline.addLast("openHandler", new OpenChannelHandler(server));
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java
index ba1703e86..7bbab071d 100644
--- a/src/org/traccar/TrackerServer.java
+++ b/src/org/traccar/TrackerServer.java
@@ -37,6 +37,10 @@ public abstract class TrackerServer {
private final Bootstrap bootstrap;
private final String protocol;
+ public boolean isConnectionless() {
+ return bootstrap instanceof ConnectionlessBootstrap;
+ }
+
public String getProtocol() {
return protocol;
}