ok2c commented on code in PR #714:
URL: 
https://github.com/apache/httpcomponents-client/pull/714#discussion_r2306944899


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java:
##########
@@ -1094,8 +1095,10 @@ public CloseableHttpAsyncClient build() {
             }
             if (evictExpiredConnections || evictIdleConnections) {
                 if (connManagerCopy instanceof ConnPoolControl) {
+                    TimeValue sleepTime = maxIdleTime.divide(10, 
TimeUnit.NANOSECONDS);
+                    sleepTime = sleepTime.compareTo(TimeValue.ofSeconds(1L)) < 
0 ? TimeValue.ofSeconds(1L) : sleepTime;

Review Comment:
   @sanghwa-min For now just add a private static variables to the builder 
classes. At a later point we can add `ONE_SECOND` static variable to the 
`TimeValue` in core.



-- 
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]

Reply via email to