arturobernalg opened a new pull request, #809: URL: https://github.com/apache/httpcomponents-client/pull/809
This patch fixes a race in PoolingHttpClientConnectionManager#lease(). When LeaseRequest#get(...) exits with TimeoutException or InterruptedException, the current code calls leaseFuture.cancel(true). If the underlying lease completes just before cancellation is observed, cancel(true) returns false and the PoolEntry can remain leased, because no ConnectionEndpoint was returned to the caller and nothing releases it. The fix handles that case in the exceptional path: if cancel(true) returns false, the code attempts a zero-timeout get() on the lease future and, if a late-completed PoolEntry is obtained, releases it immediately back to the pool. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
