diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 2eead0b8a3a70a..60083c6393e781 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 c3e14cbb53a721..3fc5e408b76a5a 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();