From 2c41576766934bb4afbb4e1f7012509de93e1844 Mon Sep 17 00:00:00 2001 From: Tristian Flanagan Date: Wed, 13 Jan 2016 10:00:19 -0500 Subject: [PATCH] lib: fixme defer error to next tick --- lib/internal/child_process.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 6487de2e9efa08..bdb240d9efc832 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -510,7 +510,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; }; @@ -612,7 +612,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)); } } }