Skip to content

Commit

Permalink
Merge pull request apache#13 from bohrqiu/master
Browse files Browse the repository at this point in the history
修复注册中心为zookeeper,管理控制台删除路由失败的问题
  • Loading branch information
liangfei0201 committed Jan 2, 2014
2 parents 8bdeb54 + fcb1ca6 commit db0b7e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void enableRoute(Long id) {
return;
}

URL newRoute = oldRoute.removeParameter("enabled");
registryService.unregister(oldRoute);
registryService.unregister(oldRoute);
URL newRoute= oldRoute.addParameter("enabled", true);
registryService.register(newRoute);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import org.I0Itec.zkclient.exception.ZkNoNodeException;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
Expand Down Expand Up @@ -193,14 +191,10 @@ public List<URL> lookup(URL url) {
try {
List<String> providers = new ArrayList<String>();
for (String path : toCategoriesPath(url)) {
try {
List<String> children = zkClient.getChildren(path);
if (children != null) {
providers.addAll(children);
}
} catch (ZkNoNodeException e) {
// ignore
}
}
return toUrlsWithoutEmpty(url, providers);
} catch (Throwable e) {
Expand Down

0 comments on commit db0b7e0

Please sign in to comment.