From 52eeac76e164271a147bb41e67c474739b4c2998 Mon Sep 17 00:00:00 2001 From: Douglas Palmer Date: Thu, 2 Mar 2023 15:45:11 -0800 Subject: [PATCH] Set connection TTL in adapters HttpClientBuilder closes #17304 --- .../src/main/java/org/keycloak/adapters/HttpClientBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/HttpClientBuilder.java b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/HttpClientBuilder.java index 5d91e985ee..aea696055b 100755 --- a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/HttpClientBuilder.java +++ b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/HttpClientBuilder.java @@ -305,7 +305,7 @@ public class HttpClientBuilder { HttpClientConnectionManager cm; if (connectionPoolSize > 0) { - PoolingHttpClientConnectionManager tcm = new PoolingHttpClientConnectionManager(sf.build()); + PoolingHttpClientConnectionManager tcm = new PoolingHttpClientConnectionManager(sf.build(), null, null, null, connectionTTL, connectionTTLUnit); tcm.setMaxTotal(connectionPoolSize); if (maxPooledPerRoute == 0) maxPooledPerRoute = connectionPoolSize; tcm.setDefaultMaxPerRoute(maxPooledPerRoute);