You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/19 20:05:41 UTC

[jira] [Commented] (HTTPCLIENT-1830) IdleConnectionEvictor created by HttpClientBuilder should awaitTermination on shutdown

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931921#comment-15931921 ] 

ASF GitHub Bot commented on HTTPCLIENT-1830:
--------------------------------------------

GitHub user theangrydev opened a pull request:

    https://github.com/apache/httpclient/pull/67

    HTTPCLIENT-1830: await termination of the IdleConnectionEvictor when it is shut down

    See [HTTPCLIENT-1830](https://issues.apache.org/jira/browse/HTTPCLIENT-1830) for more details.
    
    I also noticed something weird with the original implementation of this in [HTTPCLIENT-1583](https://issues.apache.org/jira/browse/HTTPCLIENT-1583) that I think means that `HttpClientBuilder.evictExpiredConnections` is not working as intended, see my comment on that ticket.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/theangrydev/httpclient trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/httpclient/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #67
    
----
commit eb225da72048e5ec5be8849b335f88995317be74
Author: Liam Williams <li...@zoho.com>
Date:   2017-03-19T20:01:35Z

    HTTPCLIENT-1830: await termination of the IdleConnectionEvictor when it is shut down

----


> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org