diff --git a/transport/src/main/java/io/netty/channel/socket/aio/AioServerSocketChannelConfig.java b/transport/src/main/java/io/netty/channel/socket/aio/AioServerSocketChannelConfig.java index 990e8172b5..3f59d9328a 100644 --- a/transport/src/main/java/io/netty/channel/socket/aio/AioServerSocketChannelConfig.java +++ b/transport/src/main/java/io/netty/channel/socket/aio/AioServerSocketChannelConfig.java @@ -46,6 +46,7 @@ final class AioServerSocketChannelConfig extends DefaultChannelConfig } @Override + @SuppressWarnings("unchecked") public T getOption(ChannelOption option) { if (option == SO_RCVBUF) { return (T) Integer.valueOf(getReceiveBufferSize()); 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 236407b4c2..f47c329dda 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 @@ -326,7 +326,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) { @@ -390,9 +389,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 diff --git a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannelConfig.java b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannelConfig.java index ae1be50145..ba0481c62d 100644 --- a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannelConfig.java +++ b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannelConfig.java @@ -57,6 +57,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig } @Override + @SuppressWarnings("unchecked") public T getOption(ChannelOption option) { if (option == SO_RCVBUF) { return (T) Integer.valueOf(getReceiveBufferSize());