NETTY-417 client channel still open after close and wait

* Fixed a bug in SslHandler where a write attempt made after SSLEngine is closed result in unnotified future.  Fixed by respecting the case where SslEngineResult.Status == CLOSED
This commit is contained in:
Trustin Lee 2011-08-02 07:47:36 +09:00
parent c6fa82729c
commit 6f7d2f4e23

View File

@ -659,6 +659,11 @@ public class SslHandler extends FrameDecoder
channel, future, msg, channel.getRemoteAddress());
offerEncryptedWriteRequest(encryptedWrite);
offered = true;
} else if (result.getStatus() == Status.CLOSED) {
// SSLEngine has been closed already.
// Any further write attempts should be denied.
success = false;
break;
} else {
final HandshakeStatus handshakeStatus = result.getHandshakeStatus();
handleRenegotiation(handshakeStatus);