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 <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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)