diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-23 20:43:41 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-23 20:43:41 -0700 |
commit | fcba638543caa06f7e87fc7862047b29170ece22 (patch) | |
tree | 4f5ed044588a2edbf2fb89cf693c1337cf1022f1 /src | |
parent | bd12d76efb0fe728f2f001afeb5c5cfaf979af43 (diff) | |
download | trackermap-server-fcba638543caa06f7e87fc7862047b29170ece22.tar.gz trackermap-server-fcba638543caa06f7e87fc7862047b29170ece22.tar.bz2 trackermap-server-fcba638543caa06f7e87fc7862047b29170ece22.zip |
Fix HTTP commands
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/database/ActiveDevice.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/database/ActiveDevice.java b/src/main/java/org/traccar/database/ActiveDevice.java index e3ece6ad9..c05d56ad2 100644 --- a/src/main/java/org/traccar/database/ActiveDevice.java +++ b/src/main/java/org/traccar/database/ActiveDevice.java @@ -29,12 +29,14 @@ public class ActiveDevice { private final Protocol protocol; private final Channel channel; private final SocketAddress remoteAddress; + private final boolean supportsLiveCommands; public ActiveDevice(long deviceId, Protocol protocol, Channel channel, SocketAddress remoteAddress) { this.deviceId = deviceId; this.protocol = protocol; this.channel = channel; this.remoteAddress = remoteAddress; + supportsLiveCommands = BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) == null; } public Channel getChannel() { @@ -46,7 +48,7 @@ public class ActiveDevice { } public boolean supportsLiveCommands() { - return BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) == null; + return supportsLiveCommands; } public void sendCommand(Command command) { |