rschmitt commented on pull request #277:
URL:
https://github.com/apache/httpcomponents-core/pull/277#issuecomment-811325966
Just out of curiosity, did you try synchronizing on the `leaseFuture` in
`PoolingHttpClientConnectionManager`? If this works, it may have some minor
advantages (no duplicate changes in the Strict and Lax connection pools,
timeout implementation not so spread out across the code).
```java
+ synchronized (leaseFuture) {
try {
poolEntry = leaseFuture.get(timeout.getDuration(),
timeout.getTimeUnit());
if (poolEntry == null || leaseFuture.isCancelled()) {
throw new ExecutionException(new
CancellationException("Operation cancelled"));
}
} catch (final TimeoutException ex) {
leaseFuture.cancel(true);
throw ex;
}
+ }
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]