Now that LocalChannel#releaseInboundBuffers is only called from the EventLoop (eb4d317b9d
) it should clear readInProgress and drain/release the queue. Otherwise if a read event is pending (doBeginRead) was called we may later call channelRead or channelReadComplete after we have closed the channel.
Modifications: LocalChannel#releaseInboundBuffers should always clear/release the queue and set readInProgress to false Result: LocalChannel queue is more reliably cleaned up.
This commit is contained in:
parent
eb4d317b9d
commit
a25101dd0b
@ -422,9 +422,8 @@ public class LocalChannel extends AbstractChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void releaseInboundBuffers() {
|
private void releaseInboundBuffers() {
|
||||||
if (readInProgress) {
|
assert eventLoop() == null || eventLoop().inEventLoop();
|
||||||
return;
|
readInProgress = false;
|
||||||
}
|
|
||||||
Queue<Object> inboundBuffer = this.inboundBuffer;
|
Queue<Object> inboundBuffer = this.inboundBuffer;
|
||||||
Object msg;
|
Object msg;
|
||||||
while ((msg = inboundBuffer.poll()) != null) {
|
while ((msg = inboundBuffer.poll()) != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user