Skip to content

Commit b28b85a

Browse files
deokjinkimUlisesGascon
authored andcommitted
tls: remove redundant code in onConnectSecure()
Remove redundant code by moving it to outside of `if/else`. PR-URL: #49457 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matthew Aitken <[email protected]>
1 parent 9a0891f commit b28b85a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/_tls_wrap.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1688,14 +1688,12 @@ function onConnectSecure() {
16881688
debug('client emit secureConnect. rejectUnauthorized: %s, ' +
16891689
'authorizationError: %s', options.rejectUnauthorized,
16901690
this.authorizationError);
1691-
this.secureConnecting = false;
1692-
this.emit('secureConnect');
16931691
} else {
16941692
this.authorized = true;
16951693
debug('client emit secureConnect. authorized:', this.authorized);
1696-
this.secureConnecting = false;
1697-
this.emit('secureConnect');
16981694
}
1695+
this.secureConnecting = false;
1696+
this.emit('secureConnect');
16991697

17001698
this[kIsVerified] = true;
17011699
const session = this[kPendingSession];

0 commit comments

Comments
 (0)