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) {
|
private void invokeFlush0(ChannelPromise promise) {
|
||||||
Channel channel = channel();
|
Channel channel = channel();
|
||||||
if (!channel.isRegistered() && !channel.isActive()) {
|
if (!channel.isRegistered() && !channel.isActive()) {
|
||||||
promise.tryFailure(new ClosedChannelException());
|
promise.setFailure(new ClosedChannelException());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ public class DefaultChannelPromise extends FlushCheckpoint implements ChannelPro
|
|||||||
|
|
||||||
private synchronized boolean failure0(Throwable cause) {
|
private synchronized boolean failure0(Throwable cause) {
|
||||||
// Allow only once.
|
// Allow only once.
|
||||||
if (cause != null) {
|
if (this.cause != null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user