Fixed a NotYetConnectedException in closeOutboundAndChannel

This commit is contained in:
Trustin Lee 2009-04-23 01:01:10 +00:00
parent 5cd9b6722a
commit a9e3951adb

View File

@ -801,6 +801,11 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
private void closeOutboundAndChannel(
final ChannelHandlerContext context, final ChannelStateEvent e) throws SSLException {
if (!e.getChannel().isConnected()) {
context.sendDownstream(e);
return;
}
unwrap(context, e.getChannel(), ChannelBuffers.EMPTY_BUFFER, 0, 0);
if (!engine.isInboundDone()) {
if (sentCloseNotify.compareAndSet(false, true)) {