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 aebb0e8 Fix: etcd reconnect
new 4618a47 Merge pull request #828 from watermelo/fix_etcd_reconnet
aebb0e8 is described below
commit aebb0e85840795449279baccb3f6bbb9df184e99
Author: watermelon <[email protected]>
AuthorDate: Sat Oct 31 23:22:43 2020 +0800
Fix: etcd reconnect
---
remoting/etcdv3/facade.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/remoting/etcdv3/facade.go b/remoting/etcdv3/facade.go
index 52b1cce..614ba9a 100644
--- a/remoting/etcdv3/facade.go
+++ b/remoting/etcdv3/facade.go
@@ -63,7 +63,7 @@ LOOP:
r.ClientLock().Lock()
clientName := RegistryETCDV3Client
timeout, _ :=
time.ParseDuration(r.GetUrl().GetParam(constant.REGISTRY_TIMEOUT_KEY,
constant.DEFAULT_REG_TIMEOUT))
- endpoint := r.GetUrl().Location
+ endpoints := r.Client().endpoints
r.Client().Close()
r.SetClient(nil)
r.ClientLock().Unlock()
@@ -80,11 +80,11 @@ LOOP:
err = ValidateClient(
r,
WithName(clientName),
- WithEndpoints(endpoint),
+ WithEndpoints(endpoints...),
WithTimeout(timeout),
)
logger.Infof("ETCDV3ProviderRegistry.validateETCDV3Client(etcd Addr{%s}) =
error{%#v}",
- endpoint, perrors.WithStack(err))
+ endpoints, perrors.WithStack(err))
if err == nil && r.RestartCallBack() {
break
}