Removed unnecessary 'if' condition
This commit is contained in:
parent
e757135583
commit
03de679b17
@ -160,24 +160,22 @@ class LocalChannel extends AbstractChannel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pairedChannel == null || !isOpen()) {
|
// Channel is closed or not connected yet - notify as failures.
|
||||||
// Channel is closed or not connected yet - notify as failures.
|
Exception cause;
|
||||||
Exception cause;
|
if (isOpen()) {
|
||||||
if (isOpen()) {
|
cause = new NotYetConnectedException();
|
||||||
cause = new NotYetConnectedException();
|
} else {
|
||||||
} else {
|
cause = new ClosedChannelException();
|
||||||
cause = new ClosedChannelException();
|
}
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
MessageEvent e = writeBuffer.poll();
|
||||||
|
if(e == null) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
e.getFuture().setFailure(cause);
|
||||||
MessageEvent e = writeBuffer.poll();
|
fireExceptionCaught(this, cause);
|
||||||
if(e == null) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
e.getFuture().setFailure(cause);
|
|
||||||
fireExceptionCaught(this, cause);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user