mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
cluster: refactor empty for in round_robin_handle.js
PR-URL: https://github.com/nodejs/node/pull/26560 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
8855395a19
commit
4b3e9486ca
1 file changed
+4
-2
@@ -73,8 +73,10 @@ RoundRobinHandle.prototype.remove = function(worker) {
|
||||
if (this.all.size !== 0)
|
||||
return false;
|
||||
|
||||
for (var handle; handle = this.handles.shift(); handle.close())
|
||||
;
|
||||
for (const handle of this.handles) {
|
||||
handle.close();
|
||||
}
|
||||
this.handles = [];
|
||||
|
||||
this.handle.close();
|
||||
this.handle = null;
|
||||
|
||||
Reference in new issue
Block a user