Skip to content

Commit 161182e

Browse files
danbevaddaleax
authored andcommitted
tls: remove sharedCreds in Server constructor
This commit removes the var sharedCreds which is just reassigned to this._sharedCreds in the following line. PR-URL: #20491 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a1f342f commit 161182e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/_tls_wrap.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ function Server(options, listener) {
871871
// Handle option defaults:
872872
this.setOptions(options);
873873

874-
var sharedCreds = tls.createSecureContext({
874+
this._sharedCreds = tls.createSecureContext({
875875
pfx: this.pfx,
876876
key: this.key,
877877
passphrase: this.passphrase,
@@ -887,7 +887,6 @@ function Server(options, listener) {
887887
crl: this.crl,
888888
sessionIdContext: this.sessionIdContext
889889
});
890-
this._sharedCreds = sharedCreds;
891890

892891
this[kHandshakeTimeout] = options.handshakeTimeout || (120 * 1000);
893892
this[kSNICallback] = options.SNICallback;
@@ -898,11 +897,11 @@ function Server(options, listener) {
898897
}
899898

900899
if (this.sessionTimeout) {
901-
sharedCreds.context.setSessionTimeout(this.sessionTimeout);
900+
this._sharedCreds.context.setSessionTimeout(this.sessionTimeout);
902901
}
903902

904903
if (this.ticketKeys) {
905-
sharedCreds.context.setTicketKeys(this.ticketKeys);
904+
this._sharedCreds.context.setTicketKeys(this.ticketKeys);
906905
}
907906

908907
// constructor call

0 commit comments

Comments
 (0)