prof18/RSS-Parser

How to set timeout?

saldous opened this issue · 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.

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