aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SabertekProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/SabertekProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/SabertekProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SabertekProtocolDecoder.java b/src/org/traccar/protocol/SabertekProtocolDecoder.java
index d92753df3..8b7f2fb44 100644
--- a/src/org/traccar/protocol/SabertekProtocolDecoder.java
+++ b/src/org/traccar/protocol/SabertekProtocolDecoder.java
@@ -19,6 +19,7 @@ import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
+import org.traccar.NetworkMessage;
import org.traccar.helper.BitUtil;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
@@ -71,7 +72,8 @@ public class SabertekProtocolDecoder extends BaseProtocolDecoder {
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());
if (channel != null) {
- channel.write(Unpooled.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)}));
+ channel.writeAndFlush(new NetworkMessage(
+ Unpooled.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)}), remoteAddress));
}
if (deviceSession == null) {
return null;