aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GalileoProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/GalileoProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GalileoProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java
index 746e05f5d..7e17ebd93 100644
--- a/src/org/traccar/protocol/GalileoProtocolDecoder.java
+++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java
@@ -93,10 +93,10 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder {
}
private void sendReply(Channel channel, int checksum) {
- ByteBuf reply = Unpooled.buffer(3);
- reply.writeByte(0x02);
- reply.writeShortLE((short) checksum);
if (channel != null) {
+ ByteBuf reply = Unpooled.buffer(3);
+ reply.writeByte(0x02);
+ reply.writeShortLE((short) checksum);
channel.writeAndFlush(new NetworkMessage(reply, channel.remoteAddress()));
}
}