diff options
author | Anton Tananaev <anton@traccar.org> | 2022-09-29 17:23:16 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-09-29 17:23:16 -0700 |
commit | 7246644f393f9a373f4e3f2be846500e8456a286 (patch) | |
tree | bf68bd19cb29cb1e675d0034821b707d364076c7 /src | |
parent | 0f74a9c4452a044ff619f0b24d69b41aece09b94 (diff) | |
download | trackermap-server-7246644f393f9a373f4e3f2be846500e8456a286.tar.gz trackermap-server-7246644f393f9a373f4e3f2be846500e8456a286.tar.bz2 trackermap-server-7246644f393f9a373f4e3f2be846500e8456a286.zip |
Simplify commands logic
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/database/CommandsManager.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/database/CommandsManager.java b/src/main/java/org/traccar/database/CommandsManager.java index 49eda79b2..945fb13af 100644 --- a/src/main/java/org/traccar/database/CommandsManager.java +++ b/src/main/java/org/traccar/database/CommandsManager.java @@ -83,13 +83,8 @@ public class CommandsManager { } } else { DeviceSession deviceSession = connectionManager.getDeviceSession(deviceId); - if (deviceSession != null) { - if (deviceSession.supportsLiveCommands()) { - deviceSession.sendCommand(command); - } else { - getDeviceQueue(deviceId).add(command); - return false; - } + if (deviceSession != null && deviceSession.supportsLiveCommands()) { + deviceSession.sendCommand(command); } else { getDeviceQueue(deviceId).add(command); return false; |