Skip to content

Commit

Permalink
Fix: zk client multi usage of zkname
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Jun 17, 2021
1 parent 6ee163b commit 8f6db74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config_center/zookeeper/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func newZookeeperDynamicConfiguration(url *common.URL) (*zookeeperDynamicConfigu
url: url,
rootPath: "/" + url.GetParam(constant.CONFIG_NAMESPACE_KEY, config_center.DEFAULT_GROUP) + "/config",
}
err := zookeeper.ValidateZookeeperClient(c, ZkClient)
err := zookeeper.ValidateZookeeperClient(c, url.Location)
if err != nil {
logger.Errorf("zookeeper client start error ,error message is %v", err)
return nil, err
Expand Down
5 changes: 0 additions & 5 deletions registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ import (
"dubbo.apache.org/dubbo-go/v3/remoting/zookeeper"
)

const (
// RegistryZkClient zk client name
RegistryZkClient = "zk registry"
)

func init() {
extension.SetRegistry("zookeeper", newZkRegistry)
}
Expand Down
4 changes: 2 additions & 2 deletions registry/zookeeper/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
)

const (
// RegistryZkClient zk client name
// ServiceDiscoveryZkClient zk client name
ServiceDiscoveryZkClient = "zk service discovery"
)

Expand Down Expand Up @@ -108,7 +108,7 @@ func newZookeeperServiceDiscovery(name string) (registry.ServiceDiscovery, error
url: url,
rootPath: rootPath,
}
err := zookeeper.ValidateZookeeperClient(zksd, ServiceDiscoveryZkClient)
err := zookeeper.ValidateZookeeperClient(zksd, url.Location)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 8f6db74

Please sign in to comment.