Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix][client] Fix potentially unfinished CompletableFuture in doRecon…
…sumeLater (apache#14947) ### Motivation As the code is shown below, if the future returned by `doAcknowledge` is completed exceptionally, the ``result`` future can't complete. ```java typedMessageBuilderNew.sendAsync() .thenAccept(__ -> doAcknowledge(finalMessageId, ackType, Collections.emptyMap(), null) .thenAccept(v -> result.complete(null))) .exceptionally(ex -> { result.completeExceptionally(ex); return null; }); ``` ### Modifications - Use ``thenCompose`` to instead of ``thenAccept``. ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Documentation - [x] `no-need-doc`
- Loading branch information