Skip to content
Snippets Groups Projects
Commit 49f8c5ec authored by LaurenceLiZhixin's avatar LaurenceLiZhixin
Browse files

fix

parent 299b17b9
No related branches found
No related tags found
No related merge requests found
......@@ -40,11 +40,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper"
)
const (
// RegistryZkClient zk client name
RegistryZkClient = "zk registry"
)
func init() {
extension.SetRegistry("zookeeper", newZkRegistry)
}
......@@ -74,7 +69,7 @@ func newZkRegistry(url *common.URL) (registry.Registry, error) {
}
r.InitBaseRegistry(url, r)
err = zookeeper.ValidateZookeeperClient(r, RegistryZkClient)
err = zookeeper.ValidateZookeeperClient(r, url.Location)
if err != nil {
return nil, err
}
......
......@@ -44,11 +44,6 @@ import (
"github.com/apache/dubbo-go/remoting/zookeeper/curator_discovery"
)
const (
// RegistryZkClient zk client name
ServiceDiscoveryZkClient = "zk service discovery"
)
var (
// 16 would be enough. We won't use concurrentMap because in most cases, there are not race condition
instanceMap = make(map[string]registry.ServiceDiscovery, 16)
......@@ -108,7 +103,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
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment