Skip to content
Permalink
Browse files

src: replaced var with let

replaced var with let in lib/internal/cluter/master.js
PR-URL: #30397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Aldo Ambrosioni authored and MylesBorins committed Nov 12, 2019
1 parent c4fcd5b commit df4dddb0d2f33a7863a0a934b0763c74a06a3aa6
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/internal/cluster/master.js
@@ -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];
@@ -270,7 +270,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;
@@ -285,7 +285,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.

0 comments on commit df4dddb

Please sign in to comment.
You can’t perform that action at this time.