From 650d6f02af8a902dccb2d59e999c46de8d72a165 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 16 Nov 2015 11:57:26 +1300 Subject: Ignore HTTP protocol connection status --- src/org/traccar/MainEventHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java index 37f0ee387..fa908a70c 100644 --- a/src/org/traccar/MainEventHandler.java +++ b/src/org/traccar/MainEventHandler.java @@ -21,6 +21,7 @@ import org.jboss.netty.channel.ChannelStateEvent; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.socket.DatagramChannel; +import org.jboss.netty.handler.codec.http.HttpRequestDecoder; import org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler; import org.jboss.netty.handler.timeout.IdleStateEvent; import org.traccar.helper.Log; @@ -66,7 +67,9 @@ public class MainEventHandler extends IdleStateAwareChannelHandler { Log.info(formatChannel(e.getChannel()) + " disconnected"); closeChannel(e.getChannel()); - Context.getConnectionManager().removeActiveDevice(e.getChannel()); + if (ctx.getPipeline().get("httpDecoder") == null) { + Context.getConnectionManager().removeActiveDevice(e.getChannel()); + } } @Override -- cgit v1.2.3