fix updateStore destroy

the store never fires/gets a destroy event, thus it
never stops the load_task and never unqueues itself in case
the store gets destroyed but not explicitely stopped

with overriding the destroy method, this works now as intended

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-10-11 11:49:50 +02:00 committed by Dietmar Maurer
parent 840cd4669e
commit e2c2bf5e50

View File

@ -12,6 +12,13 @@ Ext.define('PVE.data.UpdateStore', {
isStopped: true,
destroy: function() {
var me = this;
me.load_task.cancel();
PVE.data.UpdateQueue.unqueue(me);
me.callParent();
},
constructor: function(config) {
var me = this;
@ -56,9 +63,6 @@ Ext.define('PVE.data.UpdateStore', {
me.callParent([config]);
me.on('destroy', function() {
load_task.cancel();
PVE.data.UpdateQueue.unqueue(me);
});
me.load_task = load_task;
}
});