amaliujia commented on code in PR #1647:
URL: https://github.com/apache/ratis/pull/1647#discussion_r4356268082


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -604,14 +613,14 @@ private void closeImpl(Throwable cause) {
       failure = e;
       throw e;
     } finally {
-      completeClose(failure);
+      completeClose(failure, allServers);
     }
   }
 
-  private void completeClose(Throwable cause) {
+  private void completeClose(Throwable cause, boolean allServers) {
     lifeCycle.transitionIfNotEqual(State.CLOSED);
     if (cause == null) {
-      closeFuture.complete(null);
+      closeFuture.complete(allServers);
     } else {
       closeFuture.completeExceptionally(cause);
     }

Review Comment:
   True. We in fact does nothing in the whenComplete clause for exceptional 
cases. 
   
   I changed to just call `closeFuture.complete(allServers);` here but also 
added a TODO to document that we do not actually handle `cause` yet.



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