Skip to content

Commit

Permalink
inline function
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshasselberg committed Aug 29, 2019
1 parent f0cb17f commit b3eb511
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions agent/metadata/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion agent/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3eb511

Please sign in to comment.