Skip to content

Commit

Permalink
child_process: get rid of another forEach() in IPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ypresto committed Jan 1, 2017
1 parent 58f6cc0 commit de82d97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,10 @@ function setupChannel(target, channel) {
var queue = target._handleQueue;
target._handleQueue = null;

queue.forEach(function(args) {
for (var i = 0; i < queue.length; i++) {
var args = queue[i];
target._send(args.message, args.handle, args.options, args.callback);
});
}

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

0 comments on commit de82d97

Please sign in to comment.