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));
}
final RequestConfig requestConfig = context.getRequestConfig();
final Timeout responseTimeout = requestConfig.getResponseTimeout();
if (responseTimeout != null) {
endpoint.setSocketTimeout(responseTimeout);
final Timeout connectTimeout = requestConfig.getConnectTimeout();
if (connectTimeout != null) {
endpoint.setSocketTimeout(connectTimeout);
}
endpoint.execute(exchangeHandler, context);
if (context.getRequestConfig().isHardCancellationEnabled()) {