Ensure the outbound buffer is not freed on write completion

- Fixes #919
This commit is contained in:
Trustin Lee 2013-01-10 21:05:09 +09:00
parent ec5ad7b22c
commit 8975406b86

View File

@ -357,6 +357,10 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
channel.writeInProgress = false;
ByteBuf buf = channel.unsafe().directOutboundContext().outboundByteBuffer();
if (buf.isFreed()) {
return;
}
buf.resumeIntermediaryDeallocations();
int writtenBytes = result.intValue();