Suwayomi: Add timeout (2min) waiting for Suwayomi staff to fix the problem (#18655)

* add huge timeout waiting for suwayomi to fix

* update versionCode

* fix: import TimeUnit and use MINUTES instead of SECONDS

---------

Co-authored-by: Alexandre JOURNET <alexandre.journet@axopen.com>
This commit is contained in:
Alexandre Journet 2023-10-23 18:44:27 +02:00 committed by GitHub
parent 3d5b6cf9d1
commit 8a49605cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Suwayomi' extName = 'Suwayomi'
pkgNameSuffix = 'all.tachidesk' pkgNameSuffix = 'all.tachidesk'
extClass = '.Tachidesk' extClass = '.Tachidesk'
extVersionCode = 11 extVersionCode = 12
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -34,6 +34,7 @@ import rx.schedulers.Schedulers
import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.injectLazy
import java.util.concurrent.TimeUnit
import kotlin.math.min import kotlin.math.min
class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() { class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() {
@ -51,6 +52,7 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() {
override val client: OkHttpClient = override val client: OkHttpClient =
network.client.newBuilder() network.client.newBuilder()
.dns(Dns.SYSTEM) // don't use DNS over HTTPS as it breaks IP addressing .dns(Dns.SYSTEM) // don't use DNS over HTTPS as it breaks IP addressing
.callTimeout(2, TimeUnit.MINUTES)
.build() .build()
override fun headersBuilder(): Headers.Builder = Headers.Builder().apply { override fun headersBuilder(): Headers.Builder = Headers.Builder().apply {