Skip to content

Commit

Permalink
Fix apache#299 Use Camel's async processor in platform-http
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Oct 29, 2019
1 parent b5c432c commit d61ddac
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,18 @@ protected void doStart() throws Exception {

newRoute.handler(
ctx -> {
final Exchange exchange = toExchange(ctx);
try {
final Exchange e = toExchange(ctx);
getProcessor().process(e);
writeResponse(ctx, e, getEndpoint().getHeaderFilterStrategy());
createUoW(exchange);
getAsyncProcessor().process(
exchange,
doneSync -> writeResponse(ctx, exchange, getEndpoint().getHeaderFilterStrategy())
);
} catch (Exception e) {
LOG.debugf(e, "Could not handle '%s'", path);
ctx.fail(e);
} finally {
doneUoW(exchange);
}
}
);
Expand Down

0 comments on commit d61ddac

Please sign in to comment.