aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-01 12:01:40 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-01 12:01:40 +1200
commit61c54f16cf75d33923fc18b6abcee843f523dec2 (patch)
tree9e0b0fc1426ce262942bcd34dfc332777e32e03a /src/org/traccar/MainEventHandler.java
parent362fb75ec0ff6f6c615f07abde917cb55da4de5c (diff)
downloadtrackermap-server-61c54f16cf75d33923fc18b6abcee843f523dec2.tar.gz
trackermap-server-61c54f16cf75d33923fc18b6abcee843f523dec2.tar.bz2
trackermap-server-61c54f16cf75d33923fc18b6abcee843f523dec2.zip
Remove disconnected devices from active
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 034cd4371..9c28d7c9d 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -62,6 +62,8 @@ public class MainEventHandler extends IdleStateAwareChannelHandler {
public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {
Log.info(formatChannel(e.getChannel()) + " disconnected");
e.getChannel().close();
+
+ Context.getConnectionManager().removeActiveDevice(e.getChannel());
}
@Override