Merge pull request #553 from jfallows/aio-unmodified-buffer
Ensure unmodified buffer delivered via pipeline after AIO read completes
This commit is contained in:
commit
cd9a36d4e7
@ -46,6 +46,7 @@ final class AioServerSocketChannelConfig extends DefaultChannelConfig
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getOption(ChannelOption<T> option) {
|
||||
if (option == SO_RCVBUF) {
|
||||
return (T) Integer.valueOf(getReceiveBufferSize());
|
||||
|
@ -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
|
||||
|
@ -57,6 +57,7 @@ final class AioSocketChannelConfig extends DefaultChannelConfig
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getOption(ChannelOption<T> option) {
|
||||
if (option == SO_RCVBUF) {
|
||||
return (T) Integer.valueOf(getReceiveBufferSize());
|
||||
|
Loading…
Reference in New Issue
Block a user