HA should check other instances every second

This commit is contained in:
Noah Hilverling 2019-05-13 13:27:38 +02:00
parent 0e58208b0b
commit aa591eb92d

6
ha.go
View file

@ -146,10 +146,8 @@ func (h *HA) Run(chEnv chan *Environment) {
previous := h.icinga2MTime
h.icinga2HeartBeat()
if h.icinga2MTime-previous < 10 {
if h.isActive {
err = h.updateOwnInstance()
}
if h.icinga2MTime-previous < 10 && h.isActive {
err = h.updateOwnInstance()
} else {
they, beat, err := h.getInstance()
if err != nil {