diff --git a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java index 18ca3faec..12d2f4ec1 100644 --- a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java +++ b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java @@ -313,11 +313,13 @@ synchronized protected void onConnected(NextFilter next, IoSession session) thro if (sslHandler == null) { InetSocketAddress s = InetSocketAddress.class.cast(session.getRemoteAddress()); SSLEngine sslEngine = createEngine(session, s); + if(nonBlockingPipeline) { sslHandler = new SSLHandlerG1(sslEngine, EXECUTOR, session); - }else { + } else { sslHandler = new SSLHandlerG0(sslEngine, EXECUTOR, session); } + session.setAttribute(SSL_HANDLER, sslHandler); }