From 1d51b06d3e226f665fd845bb0e0b2461022f6f98 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 28 Apr 2020 09:03:12 -0400 Subject: [PATCH] Increase default connect/read timeouts --- app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt index 6ec7ae955..49455ef78 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.network import android.content.Context import java.io.File +import java.util.concurrent.TimeUnit import okhttp3.Cache import okhttp3.OkHttpClient @@ -16,6 +17,8 @@ class NetworkHelper(context: Context) { val client = OkHttpClient.Builder() .cookieJar(cookieManager) .cache(Cache(cacheDir, cacheSize)) + .connectTimeout(30, TimeUnit.SECONDS) + .readTimeout(30, TimeUnit.SECONDS) .build() val cloudflareClient = client.newBuilder()