Ktor Version and Engine Used (client or server and name)
version, client/server, additional ktor modules included
1.3.1, client, ktor-client-okhttp
Describe the bug
OkHttp engine ignores preconfigured OkHttpClient in 1.3.1. This works just fine with 1.3.0 though.
To Reproduce
OkHttpClient with HttpLoggingInterceptor with your favorite logger.HttpClient with OkHttp engine that has the following configuration:fun createHttpClient(client: OkHttpClient) = HttpClient(OkHttp) {
engine { preconfigured = client }
}
Expected behavior
Use preconfigured OkHttpClient if set.
Hi @drymarev,
Thanks for reporting, it looks like a critical issue. I think I understood the root cause, so I prepared PR with the fix (https://github.com/ktorio/ktor/pull/1648).
I merged the fix, so it will be available in 1.3.2.
Most helpful comment
Hi @drymarev,
Thanks for reporting, it looks like a critical issue. I think I understood the root cause, so I prepared PR with the fix (https://github.com/ktorio/ktor/pull/1648).