Bug fix: Fixed propagation of runtime exceptions thrown during connection route setup

This commit is contained in:
Oleg Kalnichevski 2024-10-17 12:06:30 +02:00
parent 29bf4bde45
commit d68f8b068a
1 changed files with 14 additions and 0 deletions

View File

@ -191,6 +191,20 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
final AsyncExecChain.Scope scope,
final AsyncExecChain chain,
final AsyncExecCallback asyncExecCallback) {
try {
doProceedToNextHop(state, request, entityProducer, scope, chain, asyncExecCallback);
} catch (final RuntimeException ex) {
asyncExecCallback.failed(ex);
}
}
private void doProceedToNextHop(
final State state,
final HttpRequest request,
final AsyncEntityProducer entityProducer,
final AsyncExecChain.Scope scope,
final AsyncExecChain chain,
final AsyncExecCallback asyncExecCallback) {
final RouteTracker tracker = state.tracker;
final String exchangeId = scope.exchangeId;
final HttpRoute route = scope.route;