Trigger the read() after the registration was complete. See #396

This commit is contained in:
norman 2012-07-03 13:10:29 +02:00
parent e58d657421
commit 7d33846690

View File

@ -108,8 +108,15 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
if (ch == null) { if (ch == null) {
ch = AsynchronousSocketChannel.open(AsynchronousChannelGroup.withThreadPool(eventLoop())); ch = AsynchronousSocketChannel.open(AsynchronousChannelGroup.withThreadPool(eventLoop()));
config = new AioSocketChannelConfig(javaChannel()); config = new AioSocketChannelConfig(javaChannel());
return null;
} else if (remoteAddress() != null) { } else if (remoteAddress() != null) {
read(); return new Runnable() {
@Override
public void run() {
read();
}
};
} }
return null; return null;
} }