From 951c49f449a1fcc80517e4a15990555a5dfebc6c Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 16 Oct 2012 15:19:34 -0700 Subject: [PATCH] [#644] SslHandler should not defer channelActive event - otherwise a user will have a misconception about the life cycle of the actual connection. --- .../src/main/java/io/netty/handler/ssl/SslHandler.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java index 3f175b33fd..b60bb76765 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java @@ -944,18 +944,12 @@ public class SslHandler if (!future.isSuccess()) { ctx.pipeline().fireExceptionCaught(future.cause()); ctx.close(); - } else { - // Send the event upstream after the handshake was completed without an error. - // - // See https://github.com/netty/netty/issues/358 - ctx.fireChannelActive(); } - } }); - } else { - ctx.fireChannelActive(); } + + ctx.fireChannelActive(); } private void safeClose(