aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-16 12:15:43 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-16 12:15:44 +1300
commit421c13cf3aefeb0de6e057bf9d92ee4347d68f2f (patch)
tree0d1b2965ca51705d52784dcc55882e12bff24317 /src/org/traccar/MainEventHandler.java
parente151bd07a685d8b77ff6c24455ad0520e68843d4 (diff)
downloadtrackermap-server-421c13cf3aefeb0de6e057bf9d92ee4347d68f2f.tar.gz
trackermap-server-421c13cf3aefeb0de6e057bf9d92ee4347d68f2f.tar.bz2
trackermap-server-421c13cf3aefeb0de6e057bf9d92ee4347d68f2f.zip
Remove remaining handler names
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 81d19ef01..4d54a6fe6 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -19,6 +19,7 @@ import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.socket.DatagramChannel;
+import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.timeout.IdleStateEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -97,8 +98,8 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
LOGGER.info(formatChannel(ctx.channel()) + " disconnected");
closeChannel(ctx.channel());
- BaseProtocolDecoder protocolDecoder = (BaseProtocolDecoder) ctx.pipeline().get("objectDecoder");
- if (ctx.pipeline().get("httpDecoder") == null
+ BaseProtocolDecoder protocolDecoder = ctx.pipeline().get(BaseProtocolDecoder.class);
+ if (ctx.pipeline().get(HttpRequestDecoder.class) == null
&& !connectionlessProtocols.contains(protocolDecoder.getProtocolName())) {
Context.getConnectionManager().removeActiveDevice(ctx.channel());
}