Skip to content

Commit

Permalink
accept suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Mar 16, 2023
1 parent 0a059cf commit 16fb6d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2046,11 +2046,8 @@ func (c *Client) updateNodeStatus() error {
return fmt.Errorf("heartbeat response returned no valid servers")
}

// Begin polling Consul if there is no Nomad leader. We could be
// heartbeating to a Nomad server that is in the minority of a
// partition of the Nomad server quorum, but this Nomad Agent still
// has connectivity to the existing majority of Nomad Servers, but
// only if it queries Consul.
// If there's no Leader in the response we may be talking to a partitioned
// server. Redo discovery to ensure our server list is up to date.
if resp.LeaderRPCAddr == "" {
c.triggerDiscovery()
}
Expand Down

0 comments on commit 16fb6d5

Please sign in to comment.