Skip to content

Commit 493c5d9

Browse files
committed
cluster: refactor empty for in round_robin_handle.js
1 parent 6e81a95 commit 493c5d9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/internal/cluster/round_robin_handle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ RoundRobinHandle.prototype.remove = function(worker) {
7979
if (this.all.size !== 0)
8080
return false;
8181

82-
for (var handle; handle = this.handles.shift(); handle.close())
83-
;
82+
for (const handle of this.handles) {
83+
handle.close();
84+
}
85+
this.handles = [];
8486

8587
this.handle.close();
8688
this.handle = null;

0 commit comments

Comments
 (0)