Browse Source

child_process: defer error to next tick

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Tristian Flanagan 9 years ago
committed by Rich Trott
parent
commit
f2b01cba7b
  1. 4
      lib/internal/child_process.js

4
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));
}
}
}

Loading…
Cancel
Save