Potential fix for intermittent SSL test failures
This commit is contained in:
parent
c848b8cc58
commit
834277a9eb
@ -621,10 +621,8 @@ public class SslHandler extends FrameDecoder {
|
|||||||
runDelegatedTasks();
|
runDelegatedTasks();
|
||||||
break;
|
break;
|
||||||
case FINISHED:
|
case FINISHED:
|
||||||
setHandshakeSuccess(channel);
|
|
||||||
wrap(ctx, channel);
|
|
||||||
break loop;
|
|
||||||
case NOT_HANDSHAKING:
|
case NOT_HANDSHAKING:
|
||||||
|
setHandshakeSuccess(channel);
|
||||||
wrap(ctx, channel);
|
wrap(ctx, channel);
|
||||||
break loop;
|
break loop;
|
||||||
default:
|
default:
|
||||||
@ -666,6 +664,10 @@ public class SslHandler extends FrameDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setHandshakeSuccess(Channel channel) {
|
private void setHandshakeSuccess(Channel channel) {
|
||||||
|
if (!handshaking) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (handshakeLock) {
|
synchronized (handshakeLock) {
|
||||||
handshaking = false;
|
handshaking = false;
|
||||||
handshaken = true;
|
handshaken = true;
|
||||||
@ -674,6 +676,7 @@ public class SslHandler extends FrameDecoder {
|
|||||||
handshakeFuture = newHandshakeFuture(channel);
|
handshakeFuture = newHandshakeFuture(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handshakeFuture.setSuccess();
|
handshakeFuture.setSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user