RSS-Parser icon indicating copy to clipboard operation
RSS-Parser copied to clipboard

How to set timeout?

Open saldous opened this issue 2 years ago • 1 comments

I tried this but it doesn't seem to work:

val client = OkHttpClient.Builder()
            .connectTimeout(5, TimeUnit.SECONDS)
            .build()

val rssBuilder = RssParserBuilder(
            callFactory = client
        )

val parser = rssBuilder.build()

It seems prof18.rssparser does not respect the timeout settings from the OkHttpClient.

saldous avatar Nov 16 '23 19:11 saldous

Have you tried setting also the read and write timeouts?

.connectTimeout(5, TimeUnit.SECONDS)
.writeTimeout(5, TimeUnit.SECONDS)
.readTimeout(5, TimeUnit.SECONDS)

btw, I'm not modifying the client that is injected, so every setting should work

prof18 avatar Nov 16 '23 20:11 prof18