hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodolfo Udo Labsch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1857) HttpClient falsely closes a reusable connection
Date Sat, 17 Jun 2017 22:19:02 GMT
Rodolfo Udo Labsch created HTTPCLIENT-1857:

             Summary: HttpClient falsely closes a reusable connection
                 Key: HTTPCLIENT-1857
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1857
             Project: HttpComponents HttpClient
          Issue Type: Bug
            Reporter: Rodolfo Udo Labsch
         Attachments: ConnectionHolder.patch

If you create a code with a reusable httpclient and then call execute as in the example with
the following code. The http connection will be falsely closed.

private PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
httpClient = HttpClients.custom()

try (CloseableHttpResponse response = httpClient.execute(new HttpGet(enetLink), context))

The reason being that we have:
    public void close() throws IOException {
        if (this.connHolder != null) {
    public void close() throws IOException {

Just created the correction, which is attached as patch.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message