tls: remove redundant code in onConnectSecure()
Remove redundant code by moving it to outside of `if/else`. PR-URL: https://github.com/nodejs/node/pull/49457 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
This commit is contained in:
parent
8dfe4248ca
commit
c8628ed1cf
@ -1688,14 +1688,12 @@ function onConnectSecure() {
|
|||||||
debug('client emit secureConnect. rejectUnauthorized: %s, ' +
|
debug('client emit secureConnect. rejectUnauthorized: %s, ' +
|
||||||
'authorizationError: %s', options.rejectUnauthorized,
|
'authorizationError: %s', options.rejectUnauthorized,
|
||||||
this.authorizationError);
|
this.authorizationError);
|
||||||
this.secureConnecting = false;
|
|
||||||
this.emit('secureConnect');
|
|
||||||
} else {
|
} else {
|
||||||
this.authorized = true;
|
this.authorized = true;
|
||||||
debug('client emit secureConnect. authorized:', this.authorized);
|
debug('client emit secureConnect. authorized:', this.authorized);
|
||||||
this.secureConnecting = false;
|
|
||||||
this.emit('secureConnect');
|
|
||||||
}
|
}
|
||||||
|
this.secureConnecting = false;
|
||||||
|
this.emit('secureConnect');
|
||||||
|
|
||||||
this[kIsVerified] = true;
|
this[kIsVerified] = true;
|
||||||
const session = this[kPendingSession];
|
const session = this[kPendingSession];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user