From 8ebcc2f8afd55dba2e1b6cbacb15a5d844fb778c Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 30 Mar 2018 15:29:45 +0200 Subject: [PATCH] Immediately check for new configuration after we check for updates --- dashboard/src/js/client.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dashboard/src/js/client.js b/dashboard/src/js/client.js index ec77dbad0..d1a4474d7 100644 --- a/dashboard/src/js/client.js +++ b/dashboard/src/js/client.js @@ -455,15 +455,9 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N Client.prototype.checkForUpdates = function (callback) { var that = this; - if (that._refreshConfigTimer) $interval.cancel(that._refreshConfigTimer); - that._refreshConfigTimer = null; - - post('/api/v1/cloudron/check_for_updates', { }).success(function(data, status) { + post('/api/v1/cloudron/check_for_updates', {}).success(function(data, status) { if (status !== 200) return callback(new ClientError(status, data)); - - that._refreshConfigTimer = $interval(that.refreshConfig.bind(that), 5000, 20 /* 20 times */); - - callback(null); + that.refreshConfig(callback); }).error(defaultErrorHandler(callback)); };