HTHou commented on a change in pull request #1289:
URL: https://github.com/apache/incubator-iotdb/pull/1289#discussion_r442277211



##########
File path: server/src/main/java/org/apache/iotdb/db/service/RegisterManager.java
##########
@@ -64,4 +65,21 @@ public void deregisterAll() {
     iServices.clear();
     logger.info("deregister all service.");
   }
+  
+  /**
+   * stop all service and clear iService list.
+   */
+  public void shutdownAll() {
+    //we stop JMXServer at last
+    Collections.reverse(iServices);
+    for (IService service : iServices) {
+      try {
+        service.shutdown(10000);
+      } catch (Exception e) {
+        logger.error("Failed to stop {} because:", service.getID().getName(), 
e);

Review comment:
       Very good point! Thanks. Fixed.




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

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


Reply via email to