Skip to content

Commit

Permalink
src: replaced var with let
Browse files Browse the repository at this point in the history
replaced var with let in lib/internal/cluter/master.js
PR-URL: #30397
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Aldo Ambrosioni authored and addaleax committed Nov 30, 2019
1 parent 0b64e45 commit d194c0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/internal/cluster/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ cluster.settings = {};
cluster.SCHED_NONE = SCHED_NONE; // Leave it to the operating system.
cluster.SCHED_RR = SCHED_RR; // Master distributes connections.

var ids = 0;
var debugPortOffset = 1;
var initialized = false;
let ids = 0;
let debugPortOffset = 1;
let initialized = false;

// XXX(bnoordhuis) Fold cluster.schedulingPolicy into cluster.settings?
var schedulingPolicy = {
let schedulingPolicy = {
'none': SCHED_NONE,
'rr': SCHED_RR
}[process.env.NODE_CLUSTER_SCHED_POLICY];
Expand Down Expand Up @@ -271,7 +271,7 @@ function queryServer(worker, message) {

const key = `${message.address}:${message.port}:${message.addressType}:` +
`${message.fd}:${message.index}`;
var handle = handles.get(key);
let handle = handles.get(key);

if (handle === undefined) {
let address = message.address;
Expand All @@ -286,7 +286,7 @@ function queryServer(worker, message) {
address = message.address;
}

var constructor = RoundRobinHandle;
let constructor = RoundRobinHandle;
// UDP is exempt from round-robin connection balancing for what should
// be obvious reasons: it's connectionless. There is nothing to send to
// the workers except raw datagrams and that's pointless.
Expand Down

0 comments on commit d194c0f

Please sign in to comment.