This commit is contained in:
MaysWind 2016-06-22 23:04:11 +08:00
parent 6d6e72d809
commit 13ce847335

View file

@ -13,6 +13,10 @@
} }
return aria2TaskService.getTaskList(location, needRequestWholeInfo, function (response) { return aria2TaskService.getTaskList(location, needRequestWholeInfo, function (response) {
if (pauseDownloadTaskRefresh) {
return;
}
if (!response.success) { if (!response.success) {
if (response.data.message == aria2RpcErrors.Unauthorized.message) { if (response.data.message == aria2RpcErrors.Unauthorized.message) {
$interval.cancel(downloadTaskRefreshPromise); $interval.cancel(downloadTaskRefreshPromise);
@ -89,6 +93,8 @@
}); });
$scope.$on('$destroy', function () { $scope.$on('$destroy', function () {
pauseDownloadTaskRefresh = true;
if (downloadTaskRefreshPromise) { if (downloadTaskRefreshPromise) {
$interval.cancel(downloadTaskRefreshPromise); $interval.cancel(downloadTaskRefreshPromise);
} }