Skip to content

Commit 8292bc3

Browse files
addaleaxrvagg
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 f2506d4 commit 8292bc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/_tls_legacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,6 @@ module.exports = {
951951
createSecurePair:
952952
internalUtil.deprecate(createSecurePair,
953953
'tls.createSecurePair() is deprecated. Please use ' +
954-
'tls.Socket instead.', 'DEP0064'),
954+
'tls.TLSSocket instead.', 'DEP0064'),
955955
pipe
956956
};

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

Lines changed: 1 addition & 1 deletion
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)