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 277e0eaf38..f52dcf803d 100644 --- a/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java +++ b/src/main/java/org/jboss/netty/handler/ssl/SslHandler.java @@ -732,7 +732,9 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler if (needsWrap) { // wrap() acquires pendingUnencryptedWrites first and then // handshakeLock. If handshakeLock is already hold by the - // current thread, calling wrap() will lead to a dead lock. + // current thread, calling wrap() will lead to a dead lock + // i.e. pendingUnencryptedWrites -> handshakeLock vs. + // handshakeLock -> pendingUnencryptedLock -> handshakeLock if (!Thread.holdsLock(handshakeLock)) { wrap(ctx, channel); }