diff options
author | James M Snell <jasnell@gmail.com> | 2018-10-19 11:21:42 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-10-25 09:03:32 -0700 |
commit | 1523111250788e0e1651d30c1fd506e9ef4ac7f0 (patch) | |
tree | 5935190f25093fb28173a4323dc971336edd32dc /lib/net.js | |
parent | 24cb1f33d85fbb8e5cc9c10f488766ca8a21ddca (diff) | |
download | android-node-v8-1523111250788e0e1651d30c1fd506e9ef4ac7f0.tar.gz android-node-v8-1523111250788e0e1651d30c1fd506e9ef4ac7f0.tar.bz2 android-node-v8-1523111250788e0e1651d30c1fd506e9ef4ac7f0.zip |
net: deprecate _setSimultaneousAccepts() undocumented function
This is an undocumented utility function that is of questionable
utility.
Fixes: https://github.com/nodejs/node/issues/18391
PR-URL: https://github.com/nodejs/node/pull/23760
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib/net.js')
-rw-r--r-- | lib/net.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/net.js b/lib/net.js index 33ce1f74eb..d4b8bfcc2a 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1668,11 +1668,18 @@ Server.prototype.unref = function() { }; var _setSimultaneousAccepts; +var warnSimultaneousAccepts = true; if (process.platform === 'win32') { var simultaneousAccepts; _setSimultaneousAccepts = function(handle) { + if (warnSimultaneousAccepts) { + process.emitWarning( + 'net._setSimultaneousAccepts() is deprecated and will be removed.', + 'DeprecationWarning', 'DEP00XX'); + warnSimultaneousAccepts = false; + } if (handle === undefined) { return; } @@ -1688,7 +1695,14 @@ if (process.platform === 'win32') { } }; } else { - _setSimultaneousAccepts = function() {}; + _setSimultaneousAccepts = function() { + if (warnSimultaneousAccepts) { + process.emitWarning( + 'net._setSimultaneousAccepts() is deprecated and will be removed.', + 'DeprecationWarning', 'DEP00XX'); + warnSimultaneousAccepts = false; + } + }; } module.exports = { |