Skip to content

Commit

Permalink
tls: use correct class name in deprecation message
Browse files Browse the repository at this point in the history
`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]>
  • Loading branch information
addaleax authored and rvagg committed Aug 16, 2018
1 parent f2506d4 commit 8292bc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/_tls_legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,6 @@ module.exports = {
createSecurePair:
internalUtil.deprecate(createSecurePair,
'tls.createSecurePair() is deprecated. Please use ' +
'tls.Socket instead.', 'DEP0064'),
'tls.TLSSocket instead.', 'DEP0064'),
pipe
};
2 changes: 1 addition & 1 deletion test/parallel/test-tls-legacy-deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const tls = require('tls');

common.expectWarning(
'DeprecationWarning',
'tls.createSecurePair() is deprecated. Please use tls.Socket instead.'
'tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead.'
);

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

0 comments on commit 8292bc3

Please sign in to comment.