Fixed a bug where discardReadBytes is called in a wrong place
This commit is contained in:
parent
917ed5173e
commit
d66a187b5d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user