Skip to content

Commit 54ca0e1

Browse files
cjihrigtargos
authored andcommitted
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 #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]>
1 parent 64689ed commit 54ca0e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎lib/internal/cluster/master.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const EventEmitter = require('events');
77
constRoundRobinHandle=require('internal/cluster/round_robin_handle');
88
constSharedHandle=require('internal/cluster/shared_handle');
99
constWorker=require('internal/cluster/worker');
10-
const{ internal, sendHelper, handles}=require('internal/cluster/utils');
10+
const{ internal, sendHelper }=require('internal/cluster/utils');
1111
const{ERR_SOCKET_BAD_PORT}=require('internal/errors').codes;
1212
constkeys=Object.keys;
1313
constcluster=newEventEmitter();
@@ -19,6 +19,7 @@ const [ minPort, maxPort ] = [ 1024, 65535 ];
1919

2020
module.exports=cluster;
2121

22+
consthandles=newMap();
2223
cluster.isWorker=false;
2324
cluster.isMaster=true;
2425
cluster.Worker=Worker;

‎lib/internal/cluster/utils.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ const util = require('util');
33

44
module.exports={
55
sendHelper,
6-
internal,
7-
handles: newMap()// Used in tests.
6+
internal
87
};
98

109
constcallbacks=newMap();

0 commit comments

Comments
(0)