pull/306/head
gedoor 4 years ago
parent 61ab39d262
commit b055c6109a
  1. 2
      app/src/main/java/io/legado/app/service/DownloadService.kt
  2. 2
      app/src/main/java/io/legado/app/service/help/CheckSource.kt

@ -188,7 +188,7 @@ class DownloadService : BaseService() {
bookChapter, bookChapter,
scope = this, scope = this,
context = searchPool context = searchPool
).timeout(3000L) ).timeout(60000L)
.onError { .onError {
synchronized(this) { synchronized(this) {
downloadingList.remove(bookChapter.url) downloadingList.remove(bookChapter.url)

@ -50,7 +50,7 @@ class CheckSource(val source: BookSource) {
): Coroutine<*> { ): Coroutine<*> {
val webBook = WebBook(source) val webBook = WebBook(source)
return webBook.searchBook(keyword, scope = scope, context = context) return webBook.searchBook(keyword, scope = scope, context = context)
.timeout(6000L) .timeout(60000L)
.onError(Dispatchers.IO) { .onError(Dispatchers.IO) {
source.addGroup("失效") source.addGroup("失效")
App.db.bookSourceDao().update(source) App.db.bookSourceDao().update(source)

Loading…
Cancel
Save