mirror of https://github.com/status-im/consul.git
cycleServer is a pure function, save the result
This commit is contained in:
parent
94f79d2c3d
commit
49a5a1ab84
|
@ -213,7 +213,7 @@ func (sm *ServerManager) NotifyFailedServer(server *server_details.ServerDetails
|
||||||
serverCfg = sm.getServerConfig()
|
serverCfg = sm.getServerConfig()
|
||||||
|
|
||||||
if len(serverCfg.servers) > 0 && serverCfg.servers[0] == server {
|
if len(serverCfg.servers) > 0 && serverCfg.servers[0] == server {
|
||||||
serverCfg.cycleServer()
|
serverCfg.servers = serverCfg.cycleServer()
|
||||||
sm.saveServerConfig(serverCfg)
|
sm.saveServerConfig(serverCfg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue