You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "arturobernalg (via GitHub)" <gi...@apache.org> on 2023/07/20 18:37:56 UTC

[GitHub] [httpcomponents-client] arturobernalg commented on a diff in pull request #468: Check for timeToLive == 0

arturobernalg commented on code in PR #468:
URL: https://github.com/apache/httpcomponents-client/pull/468#discussion_r1269834323


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.java:
##########
@@ -323,7 +323,7 @@ public synchronized ConnectionEndpoint get(
                         final TimeValue timeToLive = connectionConfig.getTimeToLive();
                         if (TimeValue.isNonNegative(timeToLive)) {
                             final Deadline deadline = Deadline.calculate(poolEntry.getCreated(), timeToLive);
-                            if (deadline.isExpired()) {
+                            if (timeValue.getDuration() == 0 || deadline.isExpired()) {

Review Comment:
   "This doesn't even compile. Have you at least tried building it by executing 'mvn clean install'?"



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org