[1078] 优化netty bytebuf释放

This commit is contained in:
lin
2025-07-22 10:02:32 +08:00
parent 045c14da0d
commit 79ee116174
2 changed files with 1 additions and 1 deletions

View File

@@ -83,7 +83,6 @@ public class Jt808Decoder extends ByteToMessageDecoder {
}
Rs decode = handler.decode(buf, header, session, service);
buf.release();
ApplicationEvent applicationEvent = handler.getEvent();
if (applicationEvent != null) {
applicationEventPublisher.publishEvent(applicationEvent);

View File

@@ -28,6 +28,7 @@ public abstract class Re {
session.register(header.getPhoneNumber(), (int) header.getVersion(), header);
}
Rs rs = decode0(buf, header, session);
buf.release();
Rs rsHand = handler(header, session, service);
if (rs == null && rsHand != null) {
rs = rsHand;