Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6203#discussion_r199186445
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/AbstractRestHandler.java
 ---
    @@ -79,6 +79,7 @@ protected void respondToRequest(ChannelHandlerContext 
ctx, HttpRequest httpReque
                        response = FutureUtils.completedExceptionally(e);
                }
     
    +           CompletableFuture<Void> processingFinishedFuture = new 
CompletableFuture<>();
                response.whenComplete((P resp, Throwable throwable) -> {
    --- End diff --
    
    Can't we simply return the result of the `whenComplete` stage here? We 
would just need to change the return type of `respondToRequest` to 
`CompletableFuture<?>`.


---

Reply via email to