[
https://issues.apache.org/jira/browse/HTTPCLIENT-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932406#comment-15932406
]
Liam Williams commented on HTTPCLIENT-1830:
-------------------------------------------
Hey Oleg,
Sure, I am not too fussed about the implementation details, my goal is just to
make sure that we await termination when a client is closed.
Beware though, if I recall correctly there are two usages of the
IdleConnectionEvictor, one in HttpClientBuilder and another in
HttpAsyncClientBuilder so both of those would need to await termination.
The exception handling is a separate concern, but I noticed that we were
previously just swallowing the exception and so possibly losing visibility of
it in the logs.
I'll update the pull requests for 4.5.x and 4.6.x with the minimal change you
suggested and apply a similar change to master but with the added exception
logging.
How does that sound?
Thanks,
Liam
> IdleConnectionEvictor created by HttpClientBuilder should awaitTermination on
> shutdown
> --------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1830
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1830
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient (classic)
> Affects Versions: 4.5.2
> Reporter: Liam Williams
> Fix For: 4.5.4, 5.0 Alpha2
>
>
> When calling InternalHttpClient.close via the CloseableHttpClient interface
> for a client created via HttpClientBuilder, IdleConnectionEvictor.shutdown is
> called, but IdleConnectionEvictor.awaitTermination is not.
> This is a problem, since there is no way to await termination apart from
> doing a dirty sleep.
> Hope this makes sense, let me know if it doesn't.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]