aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ExtendedObjectDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/ExtendedObjectDecoder.java')
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java
index bb704c2e3..681924e87 100644
--- a/src/org/traccar/ExtendedObjectDecoder.java
+++ b/src/org/traccar/ExtendedObjectDecoder.java
@@ -20,7 +20,7 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
-import io.netty.util.ReferenceCounted;
+import io.netty.util.ReferenceCountUtil;
import org.traccar.helper.DataConverter;
import org.traccar.model.Position;
@@ -65,9 +65,7 @@ public abstract class ExtendedObjectDecoder extends ChannelInboundHandlerAdapter
}
}
} finally {
- if (originalMessage instanceof ReferenceCounted) {
- ((ReferenceCounted) originalMessage).release();
- }
+ ReferenceCountUtil.release(originalMessage);
}
}