Skip to content

Commit 2d208de

Browse files
alexey-anufrievrstoyanchev
authored andcommitted
Clear connection pool for OkHttpClient
Closes gh-23628
1 parent 3858a69 commit 2d208de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -121,6 +121,7 @@ public void destroy() throws IOException {
121121
cache.close();
122122
}
123123
this.client.dispatcher().executorService().shutdown();
124+
this.client.connectionPool().evictAll();
124125
}
125126
}
126127

0 commit comments

Comments
 (0)