Skip to content

Commit

Permalink
if workers fails to start pass the error to the user callback
Browse files Browse the repository at this point in the history
  • Loading branch information
bjrmatos committed Apr 24, 2017
1 parent 46b2635 commit 6c5b727
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/serverStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ function ensurePhantom(phantom, cb) {
return;

phantom.starting = true;
// TODO: handle callback err for .start
phantom.start(function() {

phantom.start(function(startErr) {
phantom.started = true;
phantom.starting = false;
phantom.startCb.forEach(function(cb) { cb();})
phantom.startCb.forEach(function(cb) { cb(startErr); })
});
}

Expand Down

0 comments on commit 6c5b727

Please sign in to comment.