Fix a bug in ChannelOutboundBuffer.addFlush()
It should not advance the tail if no write() was issued so far.
This commit is contained in:
parent
b57d9f307f
commit
b7a7c33fe3
@ -98,6 +98,10 @@ final class ChannelOutboundBuffer {
|
|||||||
|
|
||||||
void addFlush() {
|
void addFlush() {
|
||||||
int tail = this.tail;
|
int tail = this.tail;
|
||||||
|
if (messages[tail] == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((this.tail = tail + 1 & messages.length - 1) == head) {
|
if ((this.tail = tail + 1 & messages.length - 1) == head) {
|
||||||
doubleCapacity();
|
doubleCapacity();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user