diff --git a/.changelog/14431.txt b/.changelog/14431.txt new file mode 100644 index 000000000..f6a1a7a50 --- /dev/null +++ b/.changelog/14431.txt @@ -0,0 +1,3 @@ +```release-note:bug +client: Fixed bug where clients could attempt to connect to servers with invalid addresses retrieved from Consul. +``` diff --git a/client/client.go b/client/client.go index d7fed8682..3f4042b33 100644 --- a/client/client.go +++ b/client/client.go @@ -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)