remove listeners on uninitialize

This commit is contained in:
Girish Ramakrishnan
2015-10-30 12:52:33 -07:00
parent 93632f5c76
commit 0dda91078d
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -146,6 +146,8 @@ function autoupdatePatternChanged(pattern) {
function uninitialize(callback) {
assert.strictEqual(typeof callback, 'function');
cloudron.events.removeListener(cloudron.EVENT_ACTIVATED, recreateJobs);
if (gAutoupdaterJob) gAutoupdaterJob.stop();
gAutoupdaterJob = null;