Immediately check for new configuration after we check for updates
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user