You should also be using CloseableHttpClient
as a singleton (on a per distinct service basis).
If you want to continue creating short lived instances of CloseableHttpClient
with the same HttpClientConnectionManager
please make sure to mark it as shared when creating CloseableHttpClient
instances with HttpClientBuilder
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…