ChenSammi commented on code in PR #561:
URL: https://github.com/apache/ratis/pull/561#discussion_r924671391


##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcUtil.java:
##########
@@ -232,4 +232,12 @@ static void shutdownManagedChannel(ManagedChannel 
managedChannel) {
       }
     }
   }
+
+  /**
+   * Tries to gracefully shut down the managed channel with call back. Falls 
back to forceful shutdown if
+   * graceful shutdown times out.
+   */
+  static CompletableFuture<Void> asyncShutdownManagedChannel(ManagedChannel 
channel) {
+    return CompletableFuture.runAsync(() -> shutdownManagedChannel(channel));
+  }

Review Comment:
   Will refactor the code. 



-- 
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