when using <https://ktor.io/clients/http-client/fe...
# ktor
r
when using https://ktor.io/clients/http-client/features/timeout.html and
requestTimeoutMillis
it is not needed to set connectionRequestTimeout on the engine level as well, right? I am thinking to add to the following code
Copy code
val client = HttpClient(Apache) {
    engine {
        connectionRequestTimeout = 400
    }
    install(HttpTimeout) {
        connectTimeoutMillis = 400
        socketTimeoutMillis = 100
    }
}
into
Copy code
val client = HttpClient(Apache) {
    engine {
        connectionRequestTimeout = 400
    }
    install(HttpTimeout) {
        requestTimeoutMillis = 400
        connectTimeoutMillis = 400
        socketTimeoutMillis = 100
    }
}
Mostly to cover time spent in cases not covered by the other three timeouts (name resolution in DNS for example)
e
Hi @rrva, yes. The engine level configuration is obsolete since we have a common timeout feature
r
so it’s recommended to only set
requestTimeoutMillis
and nothing more?
đź‘Ť 1
c
This is not true for the CIO engine. Or not true anymore perhaps? as I have posted today a question around this. Since I can see that both timeout are used but I can't really understand exactly when was is vs the other one