fix bug
This commit is contained in:
parent
6d6e72d809
commit
13ce847335
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue