This is an automated email from the ASF dual-hosted git repository.
joezou pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new abd2267 ectd注册中心BUG
new 3a64a53 Merge pull request #819 from lin-jianjun/develop
abd2267 is described below
commit abd22670a83a8216f5ae457cbe35a7c7a3d64c97
Author: mac <[email protected]>
AuthorDate: Thu Oct 29 14:33:34 2020 +0800
ectd注册中心BUG
---
registry/etcdv3/registry.go | 2 +-
registry/etcdv3/service_discovery.go | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/registry/etcdv3/registry.go b/registry/etcdv3/registry.go
index 9cbc494..f3cc379 100644
--- a/registry/etcdv3/registry.go
+++ b/registry/etcdv3/registry.go
@@ -91,7 +91,7 @@ func newETCDV3Registry(url *common.URL) (registry.Registry,
error) {
r,
etcdv3.WithName(etcdv3.RegistryETCDV3Client),
etcdv3.WithTimeout(timeout),
- etcdv3.WithEndpoints(url.Location),
+ etcdv3.WithEndpoints(strings.Split(url.Location, ",")...),
); err != nil {
return nil, err
}
diff --git a/registry/etcdv3/service_discovery.go
b/registry/etcdv3/service_discovery.go
index dceaa99..e8d4aea 100644
--- a/registry/etcdv3/service_discovery.go
+++ b/registry/etcdv3/service_discovery.go
@@ -19,6 +19,7 @@ package etcdv3
import (
"fmt"
+ "strings"
"sync"
"time"
)
@@ -313,7 +314,7 @@ func newEtcdV3ServiceDiscovery(name string)
(registry.ServiceDiscovery, error) {
client := etcdv3.NewServiceDiscoveryClient(
etcdv3.WithName(etcdv3.RegistryETCDV3Client),
etcdv3.WithTimeout(timeout),
- etcdv3.WithEndpoints(remoteConfig.Address),
+ etcdv3.WithEndpoints(strings.Split(remoteConfig.Address,
",")...),
)
descriptor := fmt.Sprintf("etcd-service-discovery[%s]",
remoteConfig.Address)