Fix SslHandler handshake timeout cancellation bug
This commit is contained in:
parent
f136fb3673
commit
4e60c395a9
@ -314,13 +314,19 @@ public class SslHandler
|
||||
timeoutFuture = null;
|
||||
}
|
||||
|
||||
promise.addListener(new ChannelFutureListener() {
|
||||
@Override
|
||||
public void operationComplete(ChannelFuture f) throws Exception {
|
||||
if (timeoutFuture != null) {
|
||||
timeoutFuture.cancel(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ctx.executor().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (timeoutFuture != null) {
|
||||
timeoutFuture.cancel(false);
|
||||
}
|
||||
engine.beginHandshake();
|
||||
handshakePromises.add(promise);
|
||||
flush0(ctx, ctx.newPromise(), true);
|
||||
|
Loading…
Reference in New Issue
Block a user