Skip to content

Commit

Permalink
cluster: move handle tracking out of utils
Browse files Browse the repository at this point in the history
internal/cluster/utils.js exported a handles object, which was
used in a test. That test, test-cluster-disconnect-handles.js,
was removed in #12495. This
commit moves the handles object to the only file in the codebase
that still uses it.

PR-URL: #23131
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig authored and targos committed Oct 1, 2018
1 parent 5c97ee0 commit 26ba077
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/internal/cluster/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions lib/internal/cluster/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ const util = require('util');

module.exports = {
sendHelper,
internal,
handles: new Map() // Used in tests.
internal
};

const callbacks = new Map();
Expand Down

0 comments on commit 26ba077

Please sign in to comment.