Browse Source

Clear connection pool for OkHttpClient

Closes gh-23628
pull/24081/head
AlexeyAnufriev 5 years ago committed by Rossen Stoyanchev
parent
commit
2d208de145
  1. 3
      spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java

3
spring-web/src/main/java/org/springframework/http/client/OkHttp3ClientHttpRequestFactory.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -121,6 +121,7 @@ public class OkHttp3ClientHttpRequestFactory @@ -121,6 +121,7 @@ public class OkHttp3ClientHttpRequestFactory
cache.close();
}
this.client.dispatcher().executorService().shutdown();
this.client.connectionPool().evictAll();
}
}

Loading…
Cancel
Save