You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2020/06/30 10:26:33 UTC
[httpcomponents-client] branch master updated: HTTPCLIENT-2091:
Connect timeout is used instead of socket timeout after a tls upgrade
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 445b61a HTTPCLIENT-2091: Connect timeout is used instead of socket timeout after a tls upgrade
445b61a is described below
commit 445b61a01afed7b47926a3977cd58937be1831bf
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Tue Jun 30 12:23:24 2020 +0200
HTTPCLIENT-2091: Connect timeout is used instead of socket timeout after a tls upgrade
---
.../hc/client5/http/impl/async/InternalHttpAsyncExecRuntime.java | 7 +------
.../apache/hc/client5/http/impl/classic/InternalExecRuntime.java | 7 +------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncExecRuntime.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncExecRuntime.java
index 52f804f..23c5559 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncExecRuntime.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncExecRuntime.java
@@ -240,13 +240,8 @@ class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
@Override
public void upgradeTls(final HttpClientContext context) {
final AsyncConnectionEndpoint endpoint = ensureValid();
- final RequestConfig requestConfig = context.getRequestConfig();
- final Timeout connectTimeout = requestConfig.getConnectTimeout();
- if (TimeValue.isPositive(connectTimeout)) {
- endpoint.setSocketTimeout(connectTimeout);
- }
if (log.isDebugEnabled()) {
- log.debug(ConnPoolSupport.getId(endpoint) + ": upgrading endpoint (" + connectTimeout + ")");
+ log.debug(ConnPoolSupport.getId(endpoint) + ": upgrading endpoint");
}
manager.upgrade(endpoint, versionPolicy, context);
}
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalExecRuntime.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalExecRuntime.java
index 7931943..cda1b4c 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalExecRuntime.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalExecRuntime.java
@@ -189,13 +189,8 @@ class InternalExecRuntime implements ExecRuntime, Cancellable {
@Override
public void upgradeTls(final HttpClientContext context) throws IOException {
final ConnectionEndpoint endpoint = ensureValid();
- final RequestConfig requestConfig = context.getRequestConfig();
- final Timeout connectTimeout = requestConfig.getConnectTimeout();
- if (TimeValue.isPositive(connectTimeout)) {
- endpoint.setSocketTimeout(connectTimeout);
- }
if (log.isDebugEnabled()) {
- log.debug(ConnPoolSupport.getId(endpoint) + ": upgrading endpoint (" + connectTimeout + ")");
+ log.debug(ConnPoolSupport.getId(endpoint) + ": upgrading endpoint");
}
manager.upgrade(endpoint, context);
}