From bb75474486b574b5364798b97cd700fa10e4e642 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 16 Oct 2016 10:37:04 +1300 Subject: Get OsmAnd connection session only once --- src/org/traccar/protocol/OsmAndProtocolDecoder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index eddfb592c..6017f4a6c 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -135,8 +135,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { position.setTime(new Date()); } - DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); - if (deviceSession != null) { + if (position.getDeviceId() != 0) { sendResponse(channel, HttpResponseStatus.OK); return position; } else { -- cgit v1.2.3