Set the 'handshaking' flag before calling beginHandshake() so that any failed handshake attempt can make SslHandler.handshake(Channel) return a failed future immediately.
This commit is contained in:
parent
bf3da2d0e3
commit
b4d2056f28
@ -311,6 +311,7 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
|
||||
if (handshaking) {
|
||||
return this.handshakeFuture;
|
||||
} else {
|
||||
handshaking = true;
|
||||
try {
|
||||
engine.beginHandshake();
|
||||
runDelegatedTasks();
|
||||
@ -318,7 +319,6 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
|
||||
} catch (SSLException e) {
|
||||
handshakeFuture = this.handshakeFuture = failedFuture(channel, e);
|
||||
}
|
||||
handshaking = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user