szetszwo commented on code in PR #1069:
URL: https://github.com/apache/ratis/pull/1069#discussion_r1578616619


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderElection.java:
##########
@@ -332,6 +332,8 @@ private boolean askForVotes(Phase phase, int round) throws 
InterruptedException,
         case SINGLE_MODE_PASSED:
           return true;
         case NOT_IN_CONF:
+          server.close();
+          return false;
         case SHUTDOWN:
           server.getRaftServer().close();

Review Comment:
   Let change it for both case.
   ```java
   +++ 
b/ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderElection.java
   @@ -333,7 +333,7 @@ class LeaderElection implements Runnable {
              return true;
            case NOT_IN_CONF:
            case SHUTDOWN:
   -          server.getRaftServer().close();
   +          server.close();
              
server.getStateMachine().event().notifyServerShutdown(server.getRoleInfoProto());
              return false;
            case TIMEOUT:
   ```



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