Admaing commented on PR #18612: URL: https://github.com/apache/dolphinscheduler/pull/18612#issuecomment-5630952312
Confirmed — Address.equalsNonHost$okhttp ignores socketFactory, so the shared pool made the option unreliable in both directions. KEEP_ALIVE_CLIENT is now built from `new OkHttpClient().newBuilder()` so it has its own ConnectionPool, and getHttpClient(...) picks the base client by the flag. OkHttpUtilsTest sends consecutive requests to the same origin with different settings, and asserts the other setting's pooled connection count stays 0, that the keepalive client's socket factory produces a socket with getKeepAlive() == true, and (recorded on the test server) that the two requests did not share one TCP connection. It fails if I revert to a shared pool. getHttpClient(...) is now package-private + @VisibleForTesting so the test stays on public OkHttp APIs instead of reflecting into okhttp3.internal.*. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
