client: log when server list changes
Stop logging in the happy path when nothing has changed.
This commit is contained in:
parent
48db8135da
commit
3b1f8991a1
|
@ -208,10 +208,11 @@ func (m *Manager) SetServers(servers Servers) bool {
|
|||
// This prevents unnecessary shuffling of a failed server that was moved to the
|
||||
// bottom of the list
|
||||
if equal {
|
||||
m.logger.Debug("Not replacing server list, current server list is identical to servers discovered in Consul")
|
||||
return !equal
|
||||
}
|
||||
|
||||
m.logger.Debug("new server list", "new_servers", servers, "old_servers", m.servers)
|
||||
|
||||
// Randomize the incoming servers
|
||||
servers.shuffle()
|
||||
m.servers = servers
|
||||
|
|
Loading…
Reference in New Issue