From 1a7d1f70239bc35ab94fa6444ef9846fd71de309 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 12 Jul 2013 10:42:39 +0200 Subject: [PATCH] [#1568] Fix problem where an exception was fired after the channel was closed. * Calling fireExceptionCaught(...) in this case was not correct as we failed writes which are outbound operations. --- handler/src/main/java/io/netty/handler/ssl/SslHandler.java | 5 ----- 1 file changed, 5 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 0090b3d0de..7287ad498f 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java @@ -446,18 +446,13 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH if (result.getStatus() == Status.CLOSED) { // SSLEngine has been closed already. // Any further write attempts should be denied. - boolean failed = false; for (;;) { PendingWrite w = pendingUnencryptedWrites.poll(); if (w == null) { break; } - failed = true; w.fail(SSLENGINE_CLOSED); } - if (failed) { - ctx.fireExceptionCaught(SSLENGINE_CLOSED); - } return; } else { switch (result.getHandshakeStatus()) {