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 46c9a5f094
commit e85996ea46

View File

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