You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/10/14 07:36:22 UTC

[GitHub] [dubbo] zrlw commented on a change in pull request #9015: [3.0] change getRegistries return type to HashSet for unique, close zookeeper client that is no long used by any application

zrlw commented on a change in pull request #9015:
URL: https://github.com/apache/dubbo/pull/9015#discussion_r728713847



##########
File path: dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java
##########
@@ -113,7 +114,7 @@ public boolean isAvailable() {
     public void destroy() {
         super.destroy();
         try {
-            zkClient.close();
+            zkClient.close(getUrl().getParameter(APPLICATION_KEY, ""));

Review comment:
       calling zkClient.close(application) does not mean the client is to be closed, 
   if zookeeperTransporter == null then close it.
   otherwise check if it's not used by any application by zookeeperTransporter.close(zkClient, application) and only close it when no application use it anymore. 




-- 
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-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org