diff --git a/server.js b/server.js index 411f9482..fa03c867 100644 --- a/server.js +++ b/server.js @@ -39,7 +39,9 @@ var main = function(args, readyCb, doneCb) { server.listen(args.port, args.address, function() { var logMessage = "Appium REST http interface listener started on "+args.address+":"+args.port; console.log(logMessage.cyan); - readyCb(); + if (readyCb) { + readyCb(); + } }); server.on('close', doneCb); return appiumServer;