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;
|
flushing = true;
|
||||||
if (buf.readable()) {
|
if (buf.readable()) {
|
||||||
buf.discardReadBytes();
|
|
||||||
javaChannel().write(buf.nioBuffer(), this, WRITE_HANDLER);
|
javaChannel().write(buf.nioBuffer(), this, WRITE_HANDLER);
|
||||||
} else {
|
} else {
|
||||||
|
buf.discardReadBytes();
|
||||||
notifyFlushFutures();
|
notifyFlushFutures();
|
||||||
flushing = false;
|
flushing = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user