Skip to content

Commit

Permalink
fixing etcd stack in getToken (micro#2145)
Browse files Browse the repository at this point in the history
when provide username and password, etcd will try to get auth token from server
if server is unavailble, etcd client will stack in
when dial timeout is set, it will return err instead of stack in
  • Loading branch information
xpunch committed Apr 1, 2021
1 parent 9b41d1b commit bed53b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/registry/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func configure(e *etcdRegistry, opts ...registry.Option) error {
if e.options.Timeout == 0 {
e.options.Timeout = 5 * time.Second
}
config.DialTimeout = e.options.Timeout

if e.options.Secure || e.options.TLSConfig != nil {
tlsConfig := e.options.TLSConfig
Expand Down

0 comments on commit bed53b6

Please sign in to comment.