Repository: nodejs/node
Pull request: net: make _setSimultaneousAccepts() end-of-life deprecated

cc @nodejs/tsc 

Changed files:
filename: doc/api/deprecations.md
patch: @@ -2554,12 +2554,15 @@ undocumented `COUNTER_NET_SERVER_CONNECTION()`,
 
 <!-- YAML
 changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/57550
+    description: End-of-Life.
   - version: v12.0.0
     pr-url: https://github.com/nodejs/node/pull/23760
     description: Runtime deprecation.
 -->
 
-Type: Runtime
+Type: End-of-Life
 
 The undocumented `net._setSimultaneousAccepts()` function was originally
 intended for debugging and performance tuning when using the

filename: lib/net.js
patch: @@ -2473,48 +2473,9 @@ Server.prototype.unref = function() {
   return this;
 };
 
-let _setSimultaneousAccepts;
-let warnSimultaneousAccepts = true;
-
-if (isWindows) {
-  let simultaneousAccepts;
-
-  _setSimultaneousAccepts = function(handle) {
-    if (warnSimultaneousAccepts) {
-      process.emitWarning(
-        'net._setSimultaneousAccepts() is deprecated and will be removed.',
-        'DeprecationWarning', 'DEP0121');
-      warnSimultaneousAccepts = false;
-    }
-    if (handle === undefined) {
-      return;
-    }
-
-    if (simultaneousAccepts === undefined) {
-      simultaneousAccepts = (process.env.NODE_MANY_ACCEPTS &&
-                             process.env.NODE_MANY_ACCEPTS !== '0');
-    }
-
-    if (handle._simultaneousAccepts !== simultaneousAccepts) {
-      handle.setSimultaneousAccepts(!!simultaneousAccepts);
-      handle._simultaneousAccepts = simultaneousAccepts;
-    }
-  };
-} else {
-  _setSimultaneousAccepts = function() {
-    if (warnSimultaneousAccepts) {
-      process.emitWarning(
-        'net._setSimultaneousAccepts() is deprecated and will be removed.',
-        'DeprecationWarning', 'DEP0121');
-      warnSimultaneousAccepts = false;
-    }
-  };
-}
-
 module.exports = {
   _createServerHandle: createServerHandle,
   _normalizeArgs: normalizeArgs,
-  _setSimultaneousAccepts,
   get BlockList() {
     BlockList ??= require('internal/blocklist').BlockList;
     return BlockList;

filename: test/parallel/test-net-deprecated-setsimultaneousaccepts.js
patch: @@ -1,18 +0,0 @@
-// Flags: --no-warnings
-'use strict';
-
-// Test that DEP0121 is emitted on the first call of _setSimultaneousAccepts().
-
-const {
-  expectWarning
-} = require('../common');
-const {
-  _setSimultaneousAccepts
-} = require('net');
-
-expectWarning(
-  'DeprecationWarning',
-  'net._setSimultaneousAccepts() is deprecated and will be removed.',
-  'DEP0121');
-
-_setSimultaneousAccepts();

filename: test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js
patch: @@ -1,19 +0,0 @@
-'use strict';
-
-// Test that DEP0121 is emitted only once if _setSimultaneousAccepts() is called
-// more than once. This test is similar to
-// test-net-deprecated-setsimultaneousaccepts.js, but that test calls
-// _setSimultaneousAccepts() only once. Unlike this test, that will confirm
-// that the warning is emitted on the first call. This test doesn't check which
-// call caused the warning to be emitted.
-
-const { expectWarning } = require('../common');
-const { _setSimultaneousAccepts } = require('net');
-
-expectWarning(
-  'DeprecationWarning',
-  'net._setSimultaneousAccepts() is deprecated and will be removed.',
-  'DEP0121');
-
-_setSimultaneousAccepts();
-_setSimultaneousAccepts();