aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-04 22:12:20 +0300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-08-04 22:12:20 +0300
commitc7675dbe4bafede36f540e2ee6fbe69f9b136e1c (patch)
tree2678d3a82737567ff3e83bebd19e5e93b1fd7803 /src
parent6048f5af44d10553d76549d4c18149180f2c9113 (diff)
downloadtraccar-server-c7675dbe4bafede36f540e2ee6fbe69f9b136e1c.tar.gz
traccar-server-c7675dbe4bafede36f540e2ee6fbe69f9b136e1c.tar.bz2
traccar-server-c7675dbe4bafede36f540e2ee6fbe69f9b136e1c.zip
Exception for Teltonika status (fix #2100)
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/MainEventHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index c01760283..7d364d5e7 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -25,6 +25,7 @@ import org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler;
import org.jboss.netty.handler.timeout.IdleStateEvent;
import org.traccar.helper.Log;
import org.traccar.model.Position;
+import org.traccar.protocol.TeltonikaProtocolDecoder;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
@@ -78,7 +79,8 @@ public class MainEventHandler extends IdleStateAwareChannelHandler {
Log.info(formatChannel(e.getChannel()) + " disconnected");
closeChannel(e.getChannel());
- if (ctx.getPipeline().get("httpDecoder") == null) {
+ if (ctx.getPipeline().get("httpDecoder") == null &&
+ !(ctx.getPipeline().get("objectDecoder") instanceof TeltonikaProtocolDecoder)) {
Context.getConnectionManager().removeActiveDevice(e.getChannel());
}
}