diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-24 14:10:00 +0400 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-24 14:10:00 +0400 |
commit | d7f4e49f89a878008101b58eaa207f89068cabba (patch) | |
tree | 507c15da107559dea485f8b040ca1ccfce8cab57 /src/org/traccar/MainEventHandler.java | |
parent | 3a008c877056234e525587dbb339e5c950748b9a (diff) | |
download | trackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.tar.gz trackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.tar.bz2 trackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.zip |
Search unwrapped handlers by class
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r-- | src/org/traccar/MainEventHandler.java | 5 |
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()); } } |