Use connectTimeout as TLS handshake timeout

This commit is contained in:
Ryan Schmitt 2018-11-13 13:47:18 -08:00
parent de59e984c7
commit d3e34f70c4
1 changed files with 3 additions and 3 deletions

View File

@ -239,9 +239,9 @@ class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
log.debug(ConnPoolSupport.getId(endpoint) + ": executing " + ConnPoolSupport.getId(exchangeHandler)); log.debug(ConnPoolSupport.getId(endpoint) + ": executing " + ConnPoolSupport.getId(exchangeHandler));
} }
final RequestConfig requestConfig = context.getRequestConfig(); final RequestConfig requestConfig = context.getRequestConfig();
final Timeout responseTimeout = requestConfig.getResponseTimeout(); final Timeout connectTimeout = requestConfig.getConnectTimeout();
if (responseTimeout != null) { if (connectTimeout != null) {
endpoint.setSocketTimeout(responseTimeout); endpoint.setSocketTimeout(connectTimeout);
} }
endpoint.execute(exchangeHandler, context); endpoint.execute(exchangeHandler, context);
if (context.getRequestConfig().isHardCancellationEnabled()) { if (context.getRequestConfig().isHardCancellationEnabled()) {