From 73818854f34262c7e26b00db4df6ce0a15de6648 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Sat, 28 Oct 2023 16:23:06 +0530 Subject: [PATCH] Remove custom network timeouts The custom timeouts are a bit long when importing hundreds of feeds, so removed those and using default values --- .../sasikanth/rss/reader/network/NetworkComponent.kt | 10 +--------- .../sasikanth/rss/reader/network/NetworkComponent.kt | 9 +-------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt index 4bf1172e8..d27ddf004 100644 --- a/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt +++ b/shared/src/androidMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt @@ -18,7 +18,6 @@ package dev.sasikanth.rss.reader.network import dev.sasikanth.rss.reader.di.scopes.AppScope import io.ktor.client.HttpClient import io.ktor.client.engine.okhttp.OkHttp -import java.time.Duration import me.tatarka.inject.annotations.Provides internal actual interface NetworkComponent { @@ -29,13 +28,6 @@ internal actual interface NetworkComponent { @Provides @AppScope fun providesHttpClient(): HttpClient { - return HttpClient(OkHttp) { - engine { - config { - retryOnConnectionFailure(true) - callTimeout(Duration.ofMinutes(2)) - } - } - } + return HttpClient(OkHttp) { engine { config { retryOnConnectionFailure(true) } } } } } diff --git a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt index 7112b244f..123bd5add 100644 --- a/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt +++ b/shared/src/iosMain/kotlin/dev/sasikanth/rss/reader/network/NetworkComponent.kt @@ -28,13 +28,6 @@ internal actual interface NetworkComponent { @Provides @AppScope fun providesHttpClient(): HttpClient { - return HttpClient(Darwin) { - engine { - configureRequest { - setTimeoutInterval(60.0) - setAllowsCellularAccess(true) - } - } - } + return HttpClient(Darwin) { engine { configureRequest { setAllowsCellularAccess(true) } } } } }