Skip to content

Commit

Permalink
child_process: defer error to next tick
Browse files Browse the repository at this point in the history
PR-URL: #4670
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
  • Loading branch information
tflanagan authored and Trott committed Aug 13, 2017
1 parent 5ea25d2 commit f2b01cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ function setupChannel(target, channel) {
if (typeof callback === 'function') {
process.nextTick(callback, ex);
} else {
this.emit('error', ex); // FIXME(bnoordhuis) Defer to next tick.
process.nextTick(() => this.emit('error', ex));
}
return false;
};
Expand Down Expand Up @@ -713,7 +713,7 @@ function setupChannel(target, channel) {
if (typeof callback === 'function') {
process.nextTick(callback, ex);
} else {
this.emit('error', ex); // FIXME(bnoordhuis) Defer to next tick.
process.nextTick(() => this.emit('error', ex));
}
}
}
Expand Down

0 comments on commit f2b01cb

Please sign in to comment.