Skip to content

Commit

Permalink
Enable Connection Manager Sharing in Apache Http 4.5 (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-mcgoldrick authored Dec 9, 2024
1 parent 301ebae commit 4e94585
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public Object createHttpClient() {
UserTokenHandler userTokenHandler = (httpContext) -> httpContext.getAttribute(HttpClientContext.USER_TOKEN);
// default this implementation will create no more than than 2 concurrent connections per given route and no more 20 connections in total
return HttpClients.custom()
.setConnectionManagerShared(true)
.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
.setUserTokenHandler(userTokenHandler)
.evictIdleConnections(1L, TimeUnit.MINUTES)
Expand Down

0 comments on commit 4e94585

Please sign in to comment.