Fix a potential bug where AbstractUnsafe.flush0() fails to clear the inFlush0 flag
- Fixes #1609
This commit is contained in:
parent
8178322c5c
commit
faf8b76b5a
@ -651,12 +651,15 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
|
||||
// Mark all pending write requests as failure if the channel is inactive.
|
||||
if (!isActive()) {
|
||||
if (isOpen()) {
|
||||
outboundBuffer.failFlushed(NOT_YET_CONNECTED_EXCEPTION);
|
||||
} else {
|
||||
outboundBuffer.failFlushed(CLOSED_CHANNEL_EXCEPTION);
|
||||
try {
|
||||
if (isOpen()) {
|
||||
outboundBuffer.failFlushed(NOT_YET_CONNECTED_EXCEPTION);
|
||||
} else {
|
||||
outboundBuffer.failFlushed(CLOSED_CHANNEL_EXCEPTION);
|
||||
}
|
||||
} finally {
|
||||
inFlush0 = false;
|
||||
}
|
||||
inFlush0 = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user