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>
This commit is contained in:
parent
5ea25d2ebe
commit
f2b01cba7b
@ -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…
x
Reference in New Issue
Block a user