diff --git a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java index 260c61a788..107b7cc271 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java +++ b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java @@ -311,6 +311,7 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler if (handshaking) { return this.handshakeFuture; } else { + handshaking = true; try { engine.beginHandshake(); runDelegatedTasks(); @@ -318,7 +319,6 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler } catch (SSLException e) { handshakeFuture = this.handshakeFuture = failedFuture(channel, e); } - handshaking = true; } }