Permalink
Browse files

child_process: defer error to next tick

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 Jan 13, 2016
1 parent 5ea25d2 commit f2b01cba7b48c2410a692fe1cb29b2e88a6c5cab
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/internal/child_process.js
@@ -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;
};
@@ -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));
}
}
}

0 comments on commit f2b01cb

Please sign in to comment.