mail relay: wait for mail container to restart
This commit is contained in:
@@ -493,19 +493,25 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
|
||||
Client.setMailRelay($scope.domain.domain, data, function (error) {
|
||||
$scope.mailRelay.busy = false;
|
||||
|
||||
if (error) {
|
||||
$scope.mailRelay.error = error.message;
|
||||
$scope.mailRelay.busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.domain.relay = data;
|
||||
$scope.mailRelay.success = true;
|
||||
$scope.refreshDomain();
|
||||
|
||||
// clear success indicator after 3sec
|
||||
$timeout(function () { $scope.mailRelay.success = false; }, 3000);
|
||||
// let the mail server restart, otherwise we get "Error getting IP" errors during refresh
|
||||
$timeout(function () {
|
||||
$scope.mailRelay.busy = false;
|
||||
$scope.mailRelay.success = true;
|
||||
$scope.refreshDomain();
|
||||
|
||||
// clear success indicator after 5sec
|
||||
$timeout(function () { $scope.mailRelay.success = false; }, 5000);
|
||||
}, 5000);
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user