diff --git a/lib/serverStrategy.js b/lib/serverStrategy.js index 514ebbd..505b2d5 100644 --- a/lib/serverStrategy.js +++ b/lib/serverStrategy.js @@ -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); }) }); }