Skip to content

Commit

Permalink
Cope with asynchronous ChildProcess.prototype.send in Node v4.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Jun 14, 2016
1 parent 9fe4e66 commit 6972950
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/runners/run-app.js
Expand Up @@ -843,8 +843,14 @@ _.extend(AppRunner.prototype, {
// Notify the server that new client assets have been added to the
// build.
self._refreshing = true;
appProcess.proc.send({ refresh: 'client' });
self._refreshing = false;
// ChildProcess.prototype.send used to be synchronous, but is now
// asynchronous: https://github.com/nodejs/node/pull/2620
appProcess.proc.send({
refresh: 'client'
}, err => {
self._refreshing = false;
if (err) throw err;
});

// Establish a watcher on the new files.
setupClientWatcher();
Expand Down

0 comments on commit 6972950

Please sign in to comment.