下载加入超时判断

pull/306/head
gedoor 4 years ago
parent a5e2b51507
commit 64e5305999
  1. 6
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -188,12 +188,14 @@ class DownloadService : BaseService() {
bookChapter,
scope = this,
context = searchPool
).onError {
).timeout(3000L)
.onError {
synchronized(this) {
downloadingList.remove(bookChapter.url)
}
Download.addLog(it.localizedMessage)
}.onSuccess(IO) { content ->
}
.onSuccess(IO) { content ->
BookHelp.saveContent(book, bookChapter, content)
synchronized(this@DownloadService) {
downloadCount[book.bookUrl]?.increaseSuccess()

Loading…
Cancel
Save