aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-19 01:35:28 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-19 01:35:28 +1200
commitaa921d5acca68b92f0200183eb1c4a786a5f4882 (patch)
tree81e39c98af03038a2a167aae9fac58831d48799b /src/org
parentdf53571ab09afb15888462dbbed2c3d58759c55a (diff)
downloadtraccar-server-aa921d5acca68b92f0200183eb1c4a786a5f4882.tar.gz
traccar-server-aa921d5acca68b92f0200183eb1c4a786a5f4882.tar.bz2
traccar-server-aa921d5acca68b92f0200183eb1c4a786a5f4882.zip
Fix all protocol unit tests
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
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) {