master
MaysWind 2016-06-22 23:04:11 +08:00
parent 6d6e72d809
commit 13ce847335
1 changed files with 6 additions and 0 deletions

View File

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