diff --git a/agent/metadata/server.go b/agent/metadata/server.go index 15035c3c4507..2532fa3bfa9b 100644 --- a/agent/metadata/server.go +++ b/agent/metadata/server.go @@ -64,10 +64,6 @@ func (s *Server) String() string { return fmt.Sprintf("%s (Addr: %s/%s) (DC: %s)", s.Name, networkStr, addrStr, s.Datacenter) } -func (s *Server) HasLeft() bool { - return s.Status == serf.StatusLeft -} - var versionFormat = regexp.MustCompile(`\d+\.\d+\.\d+`) // IsConsulServer returns true if a serf member is a consul server diff --git a/agent/router/router.go b/agent/router/router.go index d723b4506aea..a0ff7635c74d 100644 --- a/agent/router/router.go +++ b/agent/router/router.go @@ -406,7 +406,7 @@ func (r *Router) GetDatacentersByDistance() ([]string, error) { continue } - if parts.HasLeft() { + if m.Status == serf.StatusLeft { r.logger.Printf("[DEBUG]: consul: server %q in area %q left, skipping", m.Name, areaID) continue