Skip to content

Commit 92a9ea3

Browse files
Jérôme Benoitaduh95
authored andcommitted
fix: handles in a SafeMap
Signed-off-by: Jérôme Benoit <[email protected]>
1 parent 0b1f164 commit 92a9ea3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/internal/cluster/child.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function _disconnect(primaryInitiated) {
270270
}
271271
}
272272

273-
for (const handle of handles) {
273+
for (const handle of handles.values()) {
274274
waitingCount++;
275275

276276
if (handle[owner_symbol])

lib/internal/cluster/primary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function removeHandlesForWorker(worker) {
153153
assert(worker);
154154

155155
// eslint-disable-next-line node-core/no-array-destructuring
156-
for (const [key, handle] of handles.entries()) {
156+
for (const [key, handle] of handles) {
157157
if (handle.remove(worker))
158158
handles.delete(key);
159159
}

0 commit comments

Comments
 (0)