Fix error handling in Client consulDiscoveryImpl (#14431)
Added a missing `continue` on non-nil error to avoid accidentally using a bad peer.
This commit is contained in:
parent
1ae26981a0
commit
98022376be
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
client: Fixed bug where clients could attempt to connect to servers with invalid addresses retrieved from Consul.
|
||||
```
|
|
@ -2869,6 +2869,7 @@ DISCOLOOP:
|
|||
addr, err := net.ResolveTCPAddr("tcp", p)
|
||||
if err != nil {
|
||||
mErr.Errors = append(mErr.Errors, err)
|
||||
continue
|
||||
}
|
||||
srv := &servers.Server{Addr: addr}
|
||||
nomadServers = append(nomadServers, srv)
|
||||
|
|
Loading…
Reference in New Issue