ok2c commented on code in PR #502: URL: https://github.com/apache/httpcomponents-client/pull/502#discussion_r1382593572
########## httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/BasicHttpClientConnectionManager.java: ########## @@ -357,7 +357,19 @@ ManagedHttpClientConnection getConnection(final HttpRoute route, final Object st this.conn = this.connFactory.createConnection(null); this.created = System.currentTimeMillis(); } else { - this.conn.activate(); + // Check if the existing connection is stale + if (this.conn.isStale()) { Review Comment: @arturobernalg Now I am confused. The `#validate` method performs the check only if the period of inactivity exceeds `ValidateAfterInactivity` setting. This is intentional and by design. One does not want to execute the stale check too often due to its cost and impact on performance. The change you are proposing seems to be breaking that. Is that really what you want? If one wants the stale check done every time one can set `ValidateAfterInactivity` to -1 -- 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-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org