Merge pull request #3678 from ByteHamster/fix-downloadservice-deadlock

Fix DownloadService deadlock
This commit is contained in:
H. Lehmann 2019-12-11 08:20:25 +01:00 committed by GitHub
commit 395dd891c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,6 @@ public class DownloadService extends Service {
removeDownload(downloader);
numberOfDownloads.decrementAndGet();
queryDownloadsAsync();
});
} else {
handleFailedDownload(downloader);
@ -270,8 +269,10 @@ public class DownloadService extends Service {
}
} catch (InterruptedException e) {
Log.e(TAG, "DownloadCompletionThread was interrupted");
return;
} catch (ExecutionException e) {
Log.e(TAG, "ExecutionException in DownloadCompletionThread: " + e.getMessage());
return;
}
}
Log.d(TAG, "End of downloadCompletionThread");