The ktor clients on kmp / android always throw tim...
# multiplatform
j
The ktor clients on kmp / android always throw timeout exception after launching the app for about 5 minutes, and the server is always ok. It start works fine, but later it is thowing this error
y
try changing network timeout in your Ktor client config
j
Tried, not working
this is the config, with the timeout config or without does not affect this issue
y
you are using ktorfit not ktor
j
ktorfit use ktor as http client
a
Have you tried adding a network security config rule to your android side?
j
Yes
image.png
i
Hmm looks like the conn pool becomes stale after 5m? Check if retrofit's retryonfailure equivalent is true here ig
j
this is fixed by using okhttp engine on android
thought CIO engine is the cause of the problem
100 Views