Skip to content

Commit

Permalink
bugfix:DUBBO-628
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchangbing committed Jan 11, 2013
1 parent 645152a commit 9552833
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ protected void doSubscribe(final URL url, final NotifyListener listener) {
listeners.putIfAbsent(listener, new ChildListener() {
public void childChanged(String parentPath, List<String> currentChilds) {
for (String child : currentChilds) {
child = URL.decode(child);
if (! anyServices.contains(child)) {
anyServices.add(child);
subscribe(url.setPath(child).addParameters(Constants.INTERFACE_KEY, child,
Expand All @@ -138,8 +139,9 @@ public void childChanged(String parentPath, List<String> currentChilds) {
zkClient.create(root, false);
List<String> services = zkClient.addChildListener(root, zkListener);
if (services != null && services.size() > 0) {
anyServices.addAll(services);
for (String service : services) {
service = URL.decode(service);
anyServices.add(service);
subscribe(url.setPath(service).addParameters(Constants.INTERFACE_KEY, service,
Constants.CHECK_KEY, String.valueOf(false)), listener);
}
Expand Down

0 comments on commit 9552833

Please sign in to comment.