ok2c commented on code in PR #694: URL: https://github.com/apache/httpcomponents-client/pull/694#discussion_r2246069191
########## httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/DefaultAsyncClientConnectionOperator.java: ########## @@ -165,7 +165,13 @@ public void completed(final IOSession session) { if (tlsStrategy != null) { try { final Timeout socketTimeout = connection.getSocketTimeout(); - final Timeout handshakeTimeout = tlsConfig.getHandshakeTimeout(); + // TLS handshake timeout precedence: + // 1. Explicitly configured handshake timeout from TlsConfig + // 2. Current socket timeout of the connection (if set) + // 3. Falls back to connectTimeout if neither is specified (handled later) + final Timeout handshakeTimeout = tlsConfig.getHandshakeTimeout() != null Review Comment: @rschmitt Would this change be OK with you? This should fix an inconsistency in the behavior of the classic and async transports. -- 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