Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Jun 17, 2021
1 parent 299b17b commit 49f8c5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}
Expand Down
7 changes: 1 addition & 6 deletions registry/zookeeper/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 49f8c5e

Please sign in to comment.