Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 015e60b commit 0395542Copy full SHA for 0395542
codec/src/main/java/io/netty/handler/codec/OutputMessageBuf.java
@@ -167,7 +167,10 @@ public boolean drainToNextOutbound(ChannelHandlerContext ctx) {
167
}
168
169
private static void writeAndRelease(ByteBuf dst, ByteBuf src) {
170
- dst.writeBytes(src, src.readerIndex(), src.readableBytes());
171
- BufUtil.release(src);
+ try {
+ dst.writeBytes(src, src.readerIndex(), src.readableBytes());
172
+ } finally {
173
+ BufUtil.release(src);
174
+ }
175
176
0 commit comments