mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-11 10:49:52 +08:00
友电netty不用主动释放内存
This commit is contained in:
@@ -4,7 +4,6 @@ import com.jsowell.common.constant.Constants;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||||
import io.netty.util.ReferenceCountUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -136,9 +135,9 @@ public class YouDianProtocolDecoder extends ByteToMessageDecoder {
|
|||||||
buffer.readerIndex(beginReader + HEADER_LENGTH_DNY + length + 2);
|
buffer.readerIndex(beginReader + HEADER_LENGTH_DNY + length + 2);
|
||||||
out.add(frame);
|
out.add(frame);
|
||||||
} finally {
|
} finally {
|
||||||
if (frame != null) {
|
// if (frame != null) {
|
||||||
ReferenceCountUtil.release(frame);
|
// ReferenceCountUtil.release(frame);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user