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)); };