aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Tr20ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Tr20ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index 1e3f8e8b2..0c4c12f60 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -18,6 +18,7 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
+import org.traccar.NetworkMessage;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
import org.traccar.helper.UnitsConverter;
@@ -60,7 +61,8 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
Parser parser = new Parser(PATTERN_PING, (String) msg);
if (parser.matches()) {
if (channel != null) {
- channel.write("&&" + parser.next() + "\r\n"); // keep-alive response
+ channel.writeAndFlush(new NetworkMessage(
+ "&&" + parser.next() + "\r\n", remoteAddress)); // keep-alive response
}
return null;
}