From 0e1c89d007b761a83c11dcb2ba378c4db02200ee Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Jun 2018 16:16:37 +1200 Subject: Mark reference counting to fix --- src/org/traccar/protocol/Gps056ProtocolDecoder.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol/Gps056ProtocolDecoder.java') diff --git a/src/org/traccar/protocol/Gps056ProtocolDecoder.java b/src/org/traccar/protocol/Gps056ProtocolDecoder.java index 00010b542..13027142f 100644 --- a/src/org/traccar/protocol/Gps056ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps056ProtocolDecoder.java @@ -89,8 +89,12 @@ public class Gps056ProtocolDecoder extends BaseProtocolDecoder { if (type.startsWith("LOGN")) { - sendResponse(channel, "LGSA" + type.substring(4), imei, - Unpooled.copiedBuffer("1", StandardCharsets.US_ASCII)); // TODO ref count + ByteBuf content = Unpooled.copiedBuffer("1", StandardCharsets.US_ASCII); + try { + sendResponse(channel, "LGSA" + type.substring(4), imei, content); + } finally { + content.release(); + } } else if (type.startsWith("GPSL")) { -- cgit v1.2.3