From 0f8fbac9f8a57ee2a57b186f575652d66e2b4979 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 7 Mar 2013 12:51:07 +0900 Subject: [PATCH] Fix a problem in SslHandler where it doesn't work with TLS False Start .. as suggested by @justinsb --- handler/src/main/java/io/netty/handler/ssl/SslHandler.java | 5 +++++ 1 file changed, 5 insertions(+) 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 f42ce0f482..0858507b4d 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java @@ -545,6 +545,11 @@ public class SslHandler setHandshakeSuccess(); continue; case NOT_HANDSHAKING: + // Workaround for TLS False Start problem reported at: + // https://github.com/netty/netty/issues/1108#issuecomment-14266970 + if (ctx.inboundByteBuffer().isReadable()) { + unwrapLater = true; + } break; default: throw new IllegalStateException("Unknown handshake status: " + result.getHandshakeStatus());