aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 4d54a6fe6..311a41f34 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -98,9 +98,8 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
LOGGER.info(formatChannel(ctx.channel()) + " disconnected");
closeChannel(ctx.channel());
- BaseProtocolDecoder protocolDecoder = ctx.pipeline().get(BaseProtocolDecoder.class);
- if (ctx.pipeline().get(HttpRequestDecoder.class) == null
- && !connectionlessProtocols.contains(protocolDecoder.getProtocolName())) {
+ if (BasePipelineFactory.getHandler(ctx.pipeline(), HttpRequestDecoder.class) == null
+ && !connectionlessProtocols.contains(ctx.pipeline().get(BaseProtocolDecoder.class).getProtocolName())) {
Context.getConnectionManager().removeActiveDevice(ctx.channel());
}
}