From aa921d5acca68b92f0200183eb1c4a786a5f4882 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 19 Jul 2017 01:35:28 +1200 Subject: Fix all protocol unit tests --- src/org/traccar/BaseProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index 7a393727b..cde858671 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -106,7 +106,7 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } public DeviceSession getDeviceSession(Channel channel, SocketAddress remoteAddress, String... uniqueIds) { - if (channel.getPipeline().get(HttpRequestDecoder.class) != null + if (channel != null && channel.getPipeline().get(HttpRequestDecoder.class) != null || Context.getConfig().getBoolean("decoder.ignoreSessionCache")) { long deviceId = findDeviceId(remoteAddress, uniqueIds); if (deviceId != 0) { -- cgit v1.2.3