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 <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>
  • 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.