Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-09-27 21:12:39 +0300
committercjihrig <cjihrig@gmail.com>2018-10-01 15:58:24 +0300
commit47a0a0b50372cfd5325753a226ca1a230850f15f (patch)
tree261cefa4f6a05100048eb8ad4ca34acd48b829f5 /lib/internal/cluster
parente7b6589a7c677ae0a1984da6ee566476befd9c80 (diff)
cluster: move handle tracking out of utils
internal/cluster/utils.js exported a handles object, which was used in a test. That test, test-cluster-disconnect-handles.js, was removed in https://github.com/nodejs/node/pull/12495. This commit moves the handles object to the only file in the codebase that still uses it. PR-URL: https://github.com/nodejs/node/pull/23131 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/cluster')
-rw-r--r--lib/internal/cluster/master.js3
-rw-r--r--lib/internal/cluster/utils.js3
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js
index 2eead0b8a3a..60083c6393e 100644
--- a/lib/internal/cluster/master.js
+++ b/lib/internal/cluster/master.js
@@ -7,7 +7,7 @@ const EventEmitter = require('events');
const RoundRobinHandle = require('internal/cluster/round_robin_handle');
const SharedHandle = require('internal/cluster/shared_handle');
const Worker = require('internal/cluster/worker');
-const { internal, sendHelper, handles } = require('internal/cluster/utils');
+const { internal, sendHelper } = require('internal/cluster/utils');
const { ERR_SOCKET_BAD_PORT } = require('internal/errors').codes;
const keys = Object.keys;
const cluster = new EventEmitter();
@@ -19,6 +19,7 @@ const [ minPort, maxPort ] = [ 1024, 65535 ];
module.exports = cluster;
+const handles = new Map();
cluster.isWorker = false;
cluster.isMaster = true;
cluster.Worker = Worker;
diff --git a/lib/internal/cluster/utils.js b/lib/internal/cluster/utils.js
index c3e14cbb53a..3fc5e408b76 100644
--- a/lib/internal/cluster/utils.js
+++ b/lib/internal/cluster/utils.js
@@ -3,8 +3,7 @@ const util = require('util');
module.exports = {
sendHelper,
- internal,
- handles: new Map() // Used in tests.
+ internal
};
const callbacks = new Map();