[#3368] Ensure ByteBuf is not release two times

Motivation:

As the ByteBuf is not set to null after release it we may try to release it again in handleReadException()

Modifications:

-  set ByteBuf to null to avoid another byteBuf.release() to be called in handleReadException()

Result:

No IllegalReferenceCountException anymore
This commit is contained in:
haohao 2015-01-29 16:26:13 +08:00 committed by Norman Maurer
parent c5bd8fd264
commit 4bafb4f95b

View File

@ -116,6 +116,7 @@ public abstract class AbstractNioByteChannel extends AbstractNioChannel {
if (localReadAmount <= 0) {
// not was read release the buffer
byteBuf.release();
byteBuf = null;
close = localReadAmount < 0;
break;
}