Fixed a bug where discardReadBytes is called in a wrong place

This commit is contained in:
Trustin Lee 2012-07-10 14:25:46 +09:00
parent 917ed5173e
commit d66a187b5d

View File

@ -163,9 +163,9 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
flushing = true;
if (buf.readable()) {
buf.discardReadBytes();
javaChannel().write(buf.nioBuffer(), this, WRITE_HANDLER);
} else {
buf.discardReadBytes();
notifyFlushFutures();
flushing = false;
}