[#1302] Make sure the handshake future is failed with a ClosedChannelException on channelInactive

This commit is contained in:
Norman Maurer 2013-04-23 18:20:38 +02:00
parent 7452d05fa6
commit c95796d981

View File

@ -599,7 +599,7 @@ public class SslHandler
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
// Make sure the handshake future is notified when a connection has
// been closed during handshake.
setHandshakeFailure(null);
setHandshakeFailure(new ClosedChannelException());
try {
inboundBufferUpdated(ctx);
@ -921,7 +921,7 @@ public class SslHandler
// is managing.
engine.closeOutbound();
final boolean disconnected = cause == null || cause instanceof ClosedChannelException;
final boolean disconnected = cause instanceof ClosedChannelException;
try {
engine.closeInbound();
} catch (SSLException e) {