ok2c commented on code in PR #809:
URL:
https://github.com/apache/httpcomponents-client/pull/809#discussion_r2890909333
##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.java:
##########
@@ -388,8 +389,20 @@ public ConnectionEndpoint get(
final PoolEntry<HttpRoute, ManagedHttpClientConnection>
poolEntry;
try {
poolEntry = leaseFuture.get(timeout.getDuration(),
timeout.getTimeUnit());
- } catch (final TimeoutException ex) {
- leaseFuture.cancel(true);
+ } catch (final TimeoutException | InterruptedException ex)
{
+ if (!leaseFuture.cancel(true)) {
+ try {
+ final PoolEntry<HttpRoute,
ManagedHttpClientConnection> latePoolEntry = leaseFuture.get(
Review Comment:
@arturobernalg If the method fails once the proposed fix to call another
time? That does not look right. There has to be a better fix.
--
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]