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 07e9378423
commit 99daeebe4a

View File

@ -674,6 +674,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);