aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/database/CommandsManager.java9
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;