diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index da502ca65..12192c457 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -64,6 +64,9 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { case "deviceid": DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, value); if (deviceSession == null) { + if (channel != null) { + channel.write(new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST)); + } return null; } position.setDeviceId(deviceSession.getDeviceId()); |