From cd8e2576b4404ab7491fd85ee3c82eb499b75b00 Mon Sep 17 00:00:00 2001 From: John Fallows Date: Mon, 13 Aug 2012 23:16:07 -0700 Subject: [PATCH] Ensure unmodified buffer delivered via pipeline after read completes but before next read begins. --- .../java/io/netty/channel/socket/aio/AioSocketChannel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java index c82269b82a..55db6357a7 100755 --- a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java @@ -308,7 +308,6 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne // This is needed as the ByteBuffer and the ByteBuf does not share // each others index byteBuf.writerIndex(byteBuf.writerIndex() + localReadAmount); - expandReadBuffer(byteBuf); read = true; } else if (localReadAmount < 0) { @@ -372,9 +371,9 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne @Override protected void completed0(Void result, AioSocketChannel channel) { - channel.beginRead(); ((AbstractAioUnsafe) channel.unsafe()).connectSuccess(); channel.pipeline().fireChannelActive(); + channel.beginRead(); } @Override