Skip to content

Commit

Permalink
Remove custom network timeouts
Browse files Browse the repository at this point in the history
The custom timeouts are a bit long when importing hundreds of feeds, so removed those and using default values
  • Loading branch information
msasikanth committed Oct 28, 2023
1 parent 459362a commit 7381885
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) } } }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) } } }
}
}

0 comments on commit 7381885

Please sign in to comment.