Github user kl0u commented on a diff in the pull request: https://github.com/apache/flink/pull/5062#discussion_r154885936 --- Diff: flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/Client.java --- @@ -166,28 +167,57 @@ public String getClientName() { * Shuts down the client and closes all connections. * * <p>After a call to this method, all returned futures will be failed. + * + * @return A {@link CompletableFuture} that will be completed when the shutdown process is done. */ - public void shutdown() { - if (shutDown.compareAndSet(false, true)) { + public CompletableFuture<Void> shutdown() { + final CompletableFuture<Void> newShutdownFuture = new CompletableFuture<>(); --- End diff -- This is the same pattern as in the case of the `AbstractServerBase` ;)
---