mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 19:29:15 +01:00
fix: Timeout issue for people running reverse proxy.
It seem like the 10 second timeout for POST gives timeout for nginx users that uses reverse proxy and this should fix it. Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
2a69a1eeb0
commit
adf1f87364
@ -14,6 +14,7 @@ import okhttp3.RequestBody.Companion.gzip
|
|||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.util.system.logcat
|
||||||
import tachiyomi.domain.sync.SyncPreferences
|
import tachiyomi.domain.sync.SyncPreferences
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class SyncYomiSyncService(
|
class SyncYomiSyncService(
|
||||||
context: Context,
|
context: Context,
|
||||||
@ -52,7 +53,12 @@ class SyncYomiSyncService(
|
|||||||
val apiKey = syncPreferences.syncAPIKey().get()
|
val apiKey = syncPreferences.syncAPIKey().get()
|
||||||
val uploadUrl = "$host/api/sync/upload"
|
val uploadUrl = "$host/api/sync/upload"
|
||||||
|
|
||||||
val client = OkHttpClient()
|
// Set timeout to 30 seconds
|
||||||
|
val client = OkHttpClient.Builder()
|
||||||
|
.connectTimeout(30, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
|
.writeTimeout(30, TimeUnit.SECONDS)
|
||||||
|
.build()
|
||||||
|
|
||||||
val headers = Headers.Builder().add(
|
val headers = Headers.Builder().add(
|
||||||
"Content-Type",
|
"Content-Type",
|
||||||
|
Loading…
Reference in New Issue
Block a user