[#1630] Fix re-entrance bug in ChannelOutboundBuffer.remove(...)
This commit is contained in:
parent
125070958d
commit
0f6cc0cc7b
@ -342,10 +342,13 @@ public final class ChannelOutboundBuffer {
|
|||||||
promise.trySuccess();
|
promise.trySuccess();
|
||||||
flushedPromises[head] = null;
|
flushedPromises[head] = null;
|
||||||
|
|
||||||
decrementPendingOutboundBytes(flushedPendingSizes[head]);
|
int size = flushedPendingSizes[head];
|
||||||
flushedPendingSizes[head] = 0;
|
flushedPendingSizes[head] = 0;
|
||||||
|
|
||||||
this.head = head + 1 & flushed.length - 1;
|
this.head = head + 1 & flushed.length - 1;
|
||||||
|
|
||||||
|
decrementPendingOutboundBytes(size);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,10 +366,12 @@ public final class ChannelOutboundBuffer {
|
|||||||
safeFail(flushedPromises[head], cause);
|
safeFail(flushedPromises[head], cause);
|
||||||
flushedPromises[head] = null;
|
flushedPromises[head] = null;
|
||||||
|
|
||||||
decrementPendingOutboundBytes(flushedPendingSizes[head]);
|
int size = flushedPendingSizes[head];
|
||||||
flushedPendingSizes[head] = 0;
|
flushedPendingSizes[head] = 0;
|
||||||
|
|
||||||
this.head = head + 1 & flushed.length - 1;
|
this.head = head + 1 & flushed.length - 1;
|
||||||
|
|
||||||
|
decrementPendingOutboundBytes(size);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user