Skip to content

Commit

Permalink
Use comma instead of space to support etcd endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
chenglch committed Jun 5, 2018
1 parent 6ed5985 commit 4a4425c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion etc/goconserver/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ console:
etcd:
dail_timeout: 5
request_timeout: 2
# multiple endpoints could be apply, separate by the space
# multiple endpoints could be apply, separate by the comma
endpoints: 127.0.0.1:2379
# if timeout, the server host will be unregistered from cluster
server_heartbeat: 5
Expand Down
2 changes: 1 addition & 1 deletion storage/etcd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewEtcdClient(config *common.EtcdCfg) (*EtcdClient, error) {
var err error
var tlsInfo transport.TLSInfo
var tlsConfig *tls.Config
endpoints := strings.Split(config.Endpoints, " ")
endpoints := strings.Split(config.Endpoints, ",")
if len(endpoints) < 1 {
plog.Error("Invalid parameter: etcd endpoints, ip/hostname list separated with space should be specified.")
return nil, common.ErrInvalidParameter
Expand Down

0 comments on commit 4a4425c

Please sign in to comment.