Do not subscribe to activation event if already activated

This commit is contained in:
Girish Ramakrishnan
2015-10-28 17:07:13 -07:00
parent 1a8fd7dd92
commit 32173b19c9
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ var NOOP_CALLBACK = function (error) { if (error) console.error(error); };
var gAddDnsRecordsTimerId = null,
gCloudronDetails = null, // cached cloudron details like region,size...
gIsActivated = false; // cached activation state so that return value is synchronous
gIsActivated = null; // cached activation state so that return value is synchronous. null means we are not initialized yet
function debugApp(app, args) {
assert(!app || typeof app === 'object');
@@ -140,7 +140,7 @@ function uninitialize(callback) {
}
function isActivatedSync() {
return gIsActivated;
return gIsActivated === true;
}
function setTimeZone(ip, callback) {