anmolnar commented on code in PR #1898:
URL: https://github.com/apache/zookeeper/pull/1898#discussion_r1225887151


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServerMain.java:
##########
@@ -180,6 +180,10 @@ public void runFromConfig(ServerConfig config) throws 
IOException, AdminServerEx
 
             serverStarted();
 
+            if (config.registerShutdownHook()) {
+                Runtime.getRuntime().addShutdownHook(new 
Thread(this::shutdown));
+            }

Review Comment:
   Good point. Don't need to add new threads, just countdown the shutdown latch 
and it should be fine. No need to touch `QuorumPeerMain` either.



-- 
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: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to