[#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.
This commit is contained in:
Norman Maurer 2013-07-12 10:42:39 +02:00
parent 030d9fd227
commit 1a7d1f7023

View File

@ -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()) {