Skip to content

Commit 7c09877

Browse files
author
xieyuliang
committed
VFS-824 Fix HttpFileSystem free Unused Resources lead to HttpClient Connection Pool Shutdown
Option Two:Share ConnectionManager.
1 parent 7d263ee commit 7c09877

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ protected HttpClientBuilder createHttpClientBuilder(final Http4FileSystemConfigB
206206
final HostnameVerifier hostNameVerifier = createHostnameVerifier(builder, fileSystemOptions);
207207
final HttpClientBuilder httpClientBuilder =
208208
HttpClients.custom()
209+
.setConnectionManagerShared(true)
209210
.setRoutePlanner(createHttpRoutePlanner(builder, fileSystemOptions))
210211
.setConnectionManager(createConnectionManager(builder, fileSystemOptions, sslContext, hostNameVerifier))
211212
.setSSLContext(sslContext)

0 commit comments

Comments
 (0)