Fix regression which lead to leak buffers when nothing could be read from the Channel.
This was introduced as part of #1812, but fortunatualy was not part of any release.
This commit is contained in:
parent
ea7b690430
commit
a86e215718
@ -115,6 +115,8 @@ public abstract class AbstractNioByteChannel extends AbstractNioChannel {
|
||||
byteBuf = allocHandle.allocate(allocator);
|
||||
int localReadAmount = doReadBytes(byteBuf);
|
||||
if (localReadAmount <= 0) {
|
||||
// not was read release the buffer
|
||||
byteBuf.release();
|
||||
close = localReadAmount < 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user