diff options
Diffstat (limited to 'src/main/java/org/traccar/session')
-rw-r--r-- | src/main/java/org/traccar/session/ConnectionManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/session/ConnectionManager.java b/src/main/java/org/traccar/session/ConnectionManager.java index 9888cca2b..2d183ee22 100644 --- a/src/main/java/org/traccar/session/ConnectionManager.java +++ b/src/main/java/org/traccar/session/ConnectionManager.java @@ -136,7 +136,9 @@ public class ConnectionManager implements BroadcastInterface { device = addUnknownDevice(uniqueIds[0]); } - if (device != null && !device.getDisabled()) { + if (device != null) { + device.checkDisabled(); + DeviceSession oldSession = sessionsByDeviceId.remove(device.getId()); if (oldSession != null) { Endpoint oldEndpoint = new Endpoint(oldSession.getChannel(), oldSession.getRemoteAddress()); @@ -160,7 +162,7 @@ public class ConnectionManager implements BroadcastInterface { return deviceSession; } else { - LOGGER.warn((device == null ? "Unknown" : "Disabled") + " device - " + String.join(" ", uniqueIds) + LOGGER.warn("Unknown device - " + String.join(" ", uniqueIds) + " (" + ((InetSocketAddress) remoteAddress).getHostString() + ")"); return null; } |