aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-19 01:30:38 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-19 01:30:38 +1200
commitdf53571ab09afb15888462dbbed2c3d58759c55a (patch)
tree51fe68b2cb142b2ed2b1819e7197e478a28eb9c1 /src
parent4f773f445e8d6e6fcc4ec030ca9c8b6b1e7c521d (diff)
downloadtrackermap-server-df53571ab09afb15888462dbbed2c3d58759c55a.tar.gz
trackermap-server-df53571ab09afb15888462dbbed2c3d58759c55a.tar.bz2
trackermap-server-df53571ab09afb15888462dbbed2c3d58759c55a.zip
Disable session cache for HTTP protocols
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 54d2bf28f..7a393727b 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -17,6 +17,7 @@ package org.traccar;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.socket.DatagramChannel;
+import org.jboss.netty.handler.codec.http.HttpRequestDecoder;
import org.traccar.helper.Log;
import org.traccar.model.Device;
import org.traccar.model.Position;
@@ -105,7 +106,8 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
}
public DeviceSession getDeviceSession(Channel channel, SocketAddress remoteAddress, String... uniqueIds) {
- if (Context.getConfig().getBoolean("decoder.ignoreSessionCache")) {
+ if (channel.getPipeline().get(HttpRequestDecoder.class) != null
+ || Context.getConfig().getBoolean("decoder.ignoreSessionCache")) {
long deviceId = findDeviceId(remoteAddress, uniqueIds);
if (deviceId != 0) {
if (Context.getConnectionManager() != null) {