From aa591eb92d5fae97b266dce0c4974c7151995247 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Mon, 13 May 2019 13:27:38 +0200 Subject: [PATCH] HA should check other instances every second --- ha.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ha.go b/ha.go index 4e743e12..1fa3564d 100644 --- a/ha.go +++ b/ha.go @@ -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 {