Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.5.2
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.