Skip to content

Commit

Permalink
fix: handles in a SafeMap
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
  • Loading branch information
Jérôme Benoit committed Oct 23, 2023
1 parent ae947a3 commit c348acb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/cluster/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function _disconnect(primaryInitiated) {
}
}

for (const handle of handles) {
for (const handle of handles.values()) {
waitingCount++;

if (handle[owner_symbol])
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/cluster/primary.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function removeHandlesForWorker(worker) {
assert(worker);

// eslint-disable-next-line node-core/no-array-destructuring
for (const [key, handle] of handles.entries()) {
for (const [key, handle] of handles) {
if (handle.remove(worker))
handles.delete(key);
}
Expand Down

0 comments on commit c348acb

Please sign in to comment.