Skip to content
Permalink
Browse files
Merge pull request #1792, fix zk unsubscribe issue.
  • Loading branch information
nzomkxia authored and chickenlj committed May 17, 2018
1 parent 36ba4c9 commit 2d7e18242f74ff66be81b3c35e68e5b5fb5fe95f
Showing 1 changed file with 8 additions and 1 deletion.
@@ -200,7 +200,14 @@ protected void doUnsubscribe(URL url, NotifyListener listener) {
if (listeners != null) {
ChildListener zkListener = listeners.get(listener);
if (zkListener != null) {
zkClient.removeChildListener(toUrlPath(url), zkListener);
if (Constants.ANY_VALUE.equals(url.getServiceInterface())) {
String root = toRootPath();
zkClient.removeChildListener(root, zkListener);
} else {
for (String path : toCategoriesPath(url)) {
zkClient.removeChildListener(path, zkListener);
}
}
}
}
}

0 comments on commit 2d7e182

Please sign in to comment.