An experimental workaround for infinite blocking SSLEngine

This commit is contained in:
Trustin Lee 2009-04-08 22:12:29 +00:00
parent 763d0cf809
commit 25a2ade130

View File

@ -645,13 +645,14 @@ public class SslHandler extends FrameDecoder {
for (;;) {
SSLEngineResult result;
synchronized (handshakeLock) {
boolean outboundDone = engine.isOutboundDone();
if (initialHandshake && !engine.getUseClientMode() &&
!engine.isInboundDone() && !engine.isOutboundDone()) {
!engine.isInboundDone() && !outboundDone) {
handshake(channel);
initialHandshake = false;
}
if (channel.getCloseFuture().isDone()) {
if (outboundDone && !channel.isConnected()) {
ChannelFuture handshakeFuture = this.handshakeFuture;
if (handshakeFuture != null &&
handshakeFuture.getCause() != null) {