Fixed a bug where the future associated with the close request is not notified when the channel was closed already when SslHandler attempts to send a closure_notify.

This shouldn't be a problem to most applications because they usually do not specify their own future object for the close request.
This commit is contained in:
Trustin Lee 2011-08-02 07:19:57 +09:00
parent 7e50bd5160
commit caf8b39172

View File

@ -1084,6 +1084,8 @@ public class SslHandler extends FrameDecoder
public void operationComplete(ChannelFuture closeNotifyFuture) throws Exception {
if (!(closeNotifyFuture.getCause() instanceof ClosedChannelException)) {
Channels.close(context, e.getFuture());
} else {
e.getFuture().setSuccess();
}
}
}