Skip to content

Commit 5514330

Browse files
addaleaxMylesBorins
authored andcommitted
tls: use correct class name in deprecation message
`tls.Socket` does not exist, and the deprecation message should refer to `tls.TLSSocket` (like the documentation for the deprecation message already does). PR-URL: #17561 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 23f4433 commit 5514330

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/_tls_legacy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,6 @@ module.exports = {
949949
createSecurePair:
950950
internalUtil.deprecate(createSecurePair,
951951
'tls.createSecurePair() is deprecated. Please use ' +
952-
'tls.Socket instead.', 'DEP0064'),
952+
'tls.TLSSocket instead.', 'DEP0064'),
953953
pipe
954954
};

test/parallel/test-tls-legacy-deprecated.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const tls = require('tls');
99

1010
common.expectWarning(
1111
'DeprecationWarning',
12-
'tls.createSecurePair() is deprecated. Please use tls.Socket instead.'
12+
'tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead.'
1313
);
1414

1515
assert.doesNotThrow(() => tls.createSecurePair());

0 commit comments

Comments
 (0)