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

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

GitHub user overquota opened a pull request:

    https://github.com/apache/httpcomponents-client/pull/103

    fixed incorrect connection close on shutdown + fixed corresponding test

    due to https://issues.apache.org/jira/browse/HTTPCLIENT-1923
    
    close() method was changed due to Oleg@ suggestion
    
    But thats was not enough, because it isnt called at all when connection 
manager is shutting down [entering in connection manager shutdown on client 
close](https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java#L1233)
 -> [shutdown method 
called](https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java#L376)

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

    $ git pull https://github.com/overquota/httpcomponents-client 4.5.x

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

    https://github.com/apache/httpcomponents-client/pull/103.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 #103
    
----
commit ebada8ff73cc70053a0462dd549ffcd687f3e6ee
Author: Aleksei Arsenev <aarseniev@...>
Date:   2018-05-11T10:14:47Z

    fixed incorrect connection close on shutdown + fixed corresponding test

----


> Not properly closing connections in BasicHttpClientConnectionManager
> --------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1923
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1923
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.5
>            Reporter: Aleksei
>            Priority: Minor
>
> Seems we are hitting something similiar to the HTTPCLIENT-1655 issue, where 
> established connections were not properly closed (client sends Reset instead 
> of FIN+ACK)
> We are using
> BasicHttpClientConnectionManager (4.5.5 httpclient version)
> and when we are calling client.close(), we see packet with Reset flag enabled 
> in tcpdump
>  
> Looks like here: 
> [https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java#L378]
> must be closeConnection()
> [https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java#L209]
> instead of shutdownConnection
>  
> This issue is not present if we are using PoolingHttpClientConnectionManager
> (in shutdown() there are pool.shutdown:
> [https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java#L410]
> where for each entry runs: entry.close(){color:#cc7832} -> 
> this{color}.closeConnection(){color:#cc7832};{color}) - we see normal 
> connection close (FIN+ACK)
>  
> What do you think about it?
> Thank you



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to