Adding additional check to if shutdown is already in process

This commit is contained in:
Moiz Virani
2014-06-25 17:00:36 -07:00
parent 163657d8c7
commit 9f7e2efd95

View File

@@ -363,6 +363,10 @@ Android.prototype.startApp = function (cb) {
};
Android.prototype.stop = function (cb) {
if (this.shuttingDown) {
logger.debug("Already in process of shutting down.");
return cb();
}
this.shuttingDown = true;
var completeShutdown = function (cb) {