Fix a bug where DefaultChannelPromise.failure0() always returns false / Revert a bad commit

This commit is contained in:
Trustin Lee 2013-02-13 22:53:10 -08:00
parent 5370573400
commit 4eff91df99
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}