Skip to content

Commit

Permalink
Fix error handling in Client consulDiscoveryImpl
Browse files Browse the repository at this point in the history
Added a missing `continue` on non-nil error to avoid accidentally using a bad peer.
  • Loading branch information
nvx authored Sep 1, 2022
1 parent baa3b05 commit f5df4b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f5df4b8

Please sign in to comment.