From 35c6e0cc2b56a5380e6808ef5603ecc2b167e032 Mon Sep 17 00:00:00 2001 From: Aldo Ambrosioni Date: Tue, 12 Nov 2019 15:07:50 +0000 Subject: [PATCH] src: replaced var with let replaced var with let in lib/internal/cluter/master.js PR-URL: https://github.com/nodejs/node/pull/30397 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- lib/internal/cluster/master.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 005de8aa1b3cbf..645d8f1bd89931 100644 --- a/lib/internal/cluster/master.js +++ b/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]; @@ -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; @@ -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.