Skip to content

Commit

Permalink
Merge pull request #819 from lin-jianjun/develop
Browse files Browse the repository at this point in the history
Fix: etcd registry
  • Loading branch information
zouyx authored Oct 31, 2020
2 parents e10fd2f + abd2267 commit 3a64a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion registry/etcdv3/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion registry/etcdv3/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package etcdv3

import (
"fmt"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3a64a53

Please sign in to comment.