diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-16 11:57:26 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-16 11:57:26 +1300 |
commit | 650d6f02af8a902dccb2d59e999c46de8d72a165 (patch) | |
tree | d0923b9bba3955b154ac94c3506e2b9267a3f2b5 /src | |
parent | 306098fbeda545babb2c48c80e7fe98e22abb801 (diff) | |
download | traccar-server-650d6f02af8a902dccb2d59e999c46de8d72a165.tar.gz traccar-server-650d6f02af8a902dccb2d59e999c46de8d72a165.tar.bz2 traccar-server-650d6f02af8a902dccb2d59e999c46de8d72a165.zip |
Ignore HTTP protocol connection status
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/MainEventHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 |