davsclaus commented on code in PR #8646:
URL: https://github.com/apache/camel/pull/8646#discussion_r1033345986


##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientProducer.java:
##########
@@ -91,7 +92,11 @@ public boolean process(Exchange exchange, AsyncCallback 
async) {
         final Boolean await = msg.getHeader(MiloConstants.HEADER_AWAIT, 
this.defaultAwaitWrites, Boolean.class);
 
         if (TRUE.equals(await)) {
-            future.whenComplete((v, ex) -> async.done(false));
+            future.whenComplete((result, throwable) -> {
+                        msg.setBody(result);

Review Comment:
   Ah what if throwable != null, eg I assume there was an error, then its 
likely better to set response, on the exchange
   
   if (throwable != null) {
   msg.getExchange().setException(throwable);
   } else {
     msg.setBody(result);
   }
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to