Anton Afanasev
04/13/2022, 4:55 PMinternal fun defaultHttpClient(): HttpClient = HttpClient {
install(HttpTimeout) {
connectTimeoutMillis = 10
requestTimeoutMillis = 10
}
}
ktor 1.6.4Aleksei Tirman [JB]
04/13/2022, 5:00 PMsocketTimeoutMillis
timeout works for the ios
engine.Anton Afanasev
04/13/2022, 5:02 PMAleksei Tirman [JB]
04/13/2022, 5:03 PMAnton Afanasev
04/13/2022, 5:05 PMsocketTimeoutMillis
related to the iOS REST or WS?Aleksei Tirman [JB]
04/13/2022, 5:07 PMSo, isIt’s related to both.related to the iOS REST or WS?socketTimeoutMillis
BTW, WS was released 2 days ago, no?The version 2.0.0 of Ktor was released a few days ago.
Anton Afanasev
04/13/2022, 5:09 PMsocketTimeout
. Would it be correct to share this value for both platforms?
I played around with numbers and seems like Android respects the requestTimeoutMillis
more than socketTimeout
.
For instance setting
install(HttpTimeout) {
socketTimeoutMillis = 10
requestTimeoutMillis = 100
}
will fail with:
io.ktor.client.features.HttpRequestTimeoutException: Request timeout has expired [url=http://myurl, request_timeout=100 ms]
even that socketTimeoutMillis has lower value.
Thats a little bit confusing, why...