summaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net.js')
-rw-r--r--lib/net.js16
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 = {