Potential fix for intermittent SSL test failures

This commit is contained in:
Trustin Lee 2008-11-16 11:29:36 +00:00
parent c848b8cc58
commit 834277a9eb

View File

@ -621,10 +621,8 @@ public class SslHandler extends FrameDecoder {
runDelegatedTasks();
break;
case FINISHED:
setHandshakeSuccess(channel);
wrap(ctx, channel);
break loop;
case NOT_HANDSHAKING:
setHandshakeSuccess(channel);
wrap(ctx, channel);
break loop;
default:
@ -666,6 +664,10 @@ public class SslHandler extends FrameDecoder {
}
private void setHandshakeSuccess(Channel channel) {
if (!handshaking) {
return;
}
synchronized (handshakeLock) {
handshaking = false;
handshaken = true;
@ -674,6 +676,7 @@ public class SslHandler extends FrameDecoder {
handshakeFuture = newHandshakeFuture(channel);
}
}
handshakeFuture.setSuccess();
}