Skip to content

Commit de82d97

Browse files
committed
child_process: get rid of another forEach() in IPC
1 parent 58f6cc0 commit de82d97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/child_process.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,10 @@ function setupChannel(target, channel) {
498498
var queue = target._handleQueue;
499499
target._handleQueue = null;
500500

501-
queue.forEach(function(args) {
501+
for (var i = 0; i < queue.length; i++) {
502+
var args = queue[i];
502503
target._send(args.message, args.handle, args.options, args.callback);
503-
});
504+
}
504505

505506
// Process a pending disconnect (if any).
506507
if (!target.connected && target.channel && !target._handleQueue)

0 commit comments

Comments
 (0)