From c7675dbe4bafede36f540e2ee6fbe69f9b136e1c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 4 Aug 2016 22:12:20 +0300 Subject: Exception for Teltonika status (fix #2100) --- src/org/traccar/MainEventHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') 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()); } } -- cgit v1.2.3