Use the correct outbound buffer for flush the writes. See #396

This commit is contained in:
Norman Maurer 2012-07-01 22:32:45 +02:00
parent 0562aad91f
commit 12112ac857

View File

@ -180,9 +180,9 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
@Override
public void completed(Integer result, AioSocketChannel channel) {
ByteBuf buf = channel.pipeline().outboundByteBuffer();
ByteBuf buf = channel.unsafe().directOutboundContext().outboundByteBuffer();
if (result > 0) {
// Update the readerIndex with the amount of read bytes
buf.readerIndex(buf.readerIndex() + result);