mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
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:
3
.changelog/14431.txt
Normal file
3
.changelog/14431.txt
Normal file
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user