Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1801

HttpRequestBase.releaseConnection() method aborts connection rather than release it

    XMLWordPrintableJSON

Details

    Description

      Trying to release any HTTP method that extends org.apache.hc.client5.http.methods.HttpRequestBase, for example:

      Package: org.apache.hc.client5.http.methods
      HttpGet get = new HttpGet();
      get.releaseConnection();

      will result into the connection being aborted and therefore instead of being released it will be removed completely from the pool of connections since the method called eventually within the org.apache.hc.client5.http.impl.sync.ConnectionHolder object (Cancellable) would be cancel() which would in turn abortConnection()

      The name of the method is misleading as the implementation of releaseConnection does not do what it claims, but rather it resets the connection.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dikhan Daniel Isaac Khan Ramiro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: