diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-16 10:37:04 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-16 10:37:04 +1300 |
commit | bb75474486b574b5364798b97cd700fa10e4e642 (patch) | |
tree | 91c7e385f2f1b8903abfaa67b44a42399d0764eb | |
parent | 4e07ad9afa05e61e884e2c4be83b1cd4f9d051ae (diff) | |
download | traccar-server-bb75474486b574b5364798b97cd700fa10e4e642.tar.gz traccar-server-bb75474486b574b5364798b97cd700fa10e4e642.tar.bz2 traccar-server-bb75474486b574b5364798b97cd700fa10e4e642.zip |
Get OsmAnd connection session only once
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 3 |
1 files changed, 1 insertions, 2 deletions
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 { |