diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-26 17:29:14 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-26 17:29:14 -0700 |
commit | c5f793815a6429d77c429f49c876f52062051f03 (patch) | |
tree | 1cf42fff6dc107ecaeff08bdb0d91b69ccad9b04 /src/main/java/org/traccar/MainEventHandler.java | |
parent | 535eb8d11fccfa7ba4bfcbe9e3d8a0bc9be8f247 (diff) | |
download | trackermap-server-c5f793815a6429d77c429f49c876f52062051f03.tar.gz trackermap-server-c5f793815a6429d77c429f49c876f52062051f03.tar.bz2 trackermap-server-c5f793815a6429d77c429f49c876f52062051f03.zip |
Handle connectionless protocols
Diffstat (limited to 'src/main/java/org/traccar/MainEventHandler.java')
-rw-r--r-- | src/main/java/org/traccar/MainEventHandler.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/MainEventHandler.java b/src/main/java/org/traccar/MainEventHandler.java index 981888577..52eb43faf 100644 --- a/src/main/java/org/traccar/MainEventHandler.java +++ b/src/main/java/org/traccar/MainEventHandler.java @@ -159,10 +159,9 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter { LOGGER.info("[{}] disconnected", NetworkUtil.session(ctx.channel())); closeChannel(ctx.channel()); - if (BasePipelineFactory.getHandler(ctx.pipeline(), HttpRequestDecoder.class) == null - && !connectionlessProtocols.contains(ctx.pipeline().get(BaseProtocolDecoder.class).getProtocolName())) { - connectionManager.deviceDisconnected(ctx.channel()); - } + boolean supportsOffline = BasePipelineFactory.getHandler(ctx.pipeline(), HttpRequestDecoder.class) == null + && !connectionlessProtocols.contains(ctx.pipeline().get(BaseProtocolDecoder.class).getProtocolName()); + connectionManager.deviceDisconnected(ctx.channel(), supportsOffline); } @Override |