HTTPCLIENT-2225: connection route calculation does not take the default RequestConfig into account

This commit is contained in:
Oleg Kalnichevski 2022-06-29 09:43:07 +02:00
parent 518eb410fe
commit 3771129376
1 changed files with 3 additions and 2 deletions

View File

@ -184,6 +184,9 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
if (requestConfig != null) { if (requestConfig != null) {
clientContext.setRequestConfig(requestConfig); clientContext.setRequestConfig(requestConfig);
} }
setupContext(clientContext);
final HttpRoute route = determineRoute( final HttpRoute route = determineRoute(
httpHost != null ? httpHost : RoutingSupport.determineHost(request), httpHost != null ? httpHost : RoutingSupport.determineHost(request),
clientContext); clientContext);
@ -194,8 +197,6 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
} }
final AsyncExecRuntime execRuntime = createAsyncExecRuntime(pushHandlerFactory); final AsyncExecRuntime execRuntime = createAsyncExecRuntime(pushHandlerFactory);
setupContext(clientContext);
final AsyncExecChain.Scheduler scheduler = this::executeScheduled; final AsyncExecChain.Scheduler scheduler = this::executeScheduled;
final AsyncExecChain.Scope scope = new AsyncExecChain.Scope(exchangeId, route, request, future, final AsyncExecChain.Scope scope = new AsyncExecChain.Scope(exchangeId, route, request, future,