Fix a bug where DefaultChannelPromise.failure0() always returns false / Revert a bad commit
This commit is contained in:
parent
5370573400
commit
4eff91df99
@ -1295,7 +1295,7 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
|
||||
private void invokeFlush0(ChannelPromise promise) {
|
||||
Channel channel = channel();
|
||||
if (!channel.isRegistered() && !channel.isActive()) {
|
||||
promise.tryFailure(new ClosedChannelException());
|
||||
promise.setFailure(new ClosedChannelException());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ public class DefaultChannelPromise extends FlushCheckpoint implements ChannelPro
|
||||
|
||||
private synchronized boolean failure0(Throwable cause) {
|
||||
// Allow only once.
|
||||
if (cause != null) {
|
||||
if (this.cause != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user