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 876d0f040a
commit ca5e14e4e7

View File

@ -191,6 +191,20 @@ private void proceedToNextHop(
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;