Fix a problem where flush future is set more than once

This commit is contained in:
Trustin Lee 2013-02-13 16:36:53 -08:00
parent 6fe6456f8d
commit e2c948782b

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.setFailure(new ClosedChannelException());
promise.tryFailure(new ClosedChannelException());
return;
}