mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
fixing etcd stack in getToken (#2145)
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
This commit is contained in:
parent
9b41d1bf08
commit
bed53b605f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user