Fix potential NPE in AioEventLoop / Always notify flush futures

This commit is contained in:
Trustin Lee 2012-07-08 22:44:15 +09:00
parent e7c6ca945f
commit ee019d344e
2 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,7 @@ public class AioEventLoop extends MultithreadEventLoop {
if (l.isShutdown()) {
command.run();
} else {
ch.eventLoop().execute(command);
l.execute(command);
}
}

View File

@ -165,6 +165,7 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
@Override
protected void doFlushByteBuffer(ByteBuf buf) throws Exception {
if (!buf.readable()) {
notifyFlushFutures();
return;
}