You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by kk...@apache.org on 2018/01/16 10:29:59 UTC

[2/2] flink git commit: [FLINK-8049] [rest] REST client reports netty exceptions on shutdown.

[FLINK-8049] [rest] REST client reports netty exceptions on shutdown.

This closes #5057.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7da32d19
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7da32d19
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7da32d19

Branch: refs/heads/master
Commit: 7da32d19f9623ca98c8a4ba76e7c406bf9318d4d
Parents: 642e11a
Author: kkloudas <kk...@gmail.com>
Authored: Wed Nov 22 18:25:06 2017 +0100
Committer: kkloudas <kk...@gmail.com>
Committed: Tue Jan 16 11:27:38 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/flink/runtime/rest/RestClient.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/7da32d19/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
index cd80083..71891de 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java
@@ -122,8 +122,14 @@ public class RestClient {
 		CompletableFuture<?> groupFuture = new CompletableFuture<>();
 		if (bootstrap != null) {
 			if (bootstrap.group() != null) {
-				bootstrap.group().shutdownGracefully(0, timeout.toMilliseconds(), TimeUnit.MILLISECONDS)
-					.addListener(ignored -> groupFuture.complete(null));
+				bootstrap.group().shutdownGracefully(0L, timeout.toMilliseconds(), TimeUnit.MILLISECONDS)
+					.addListener(finished -> {
+						if (finished.isSuccess()) {
+							groupFuture.complete(null);
+						} else {
+							groupFuture.completeExceptionally(finished.cause());
+						}
+					});
 			}
 		}