diff --git a/nun.go b/nun.go index b903772..f396b9a 100644 --- a/nun.go +++ b/nun.go @@ -43,18 +43,20 @@ func (n *nunWatch) Main() { log.Fatal("fail count too high; ending loop") return } else if n.fail > 3 { - log.Println("over three failures, increasing tick time by 5x") - ticker.Reset(5 * time.Duration(n.timer) * time.Minute) + log.Printf("over three failures, increasing tick time to %v minutes", 3*n.timer) + ticker.Reset(3 * time.Duration(n.timer) * time.Minute) break } else { + log.Printf("fail count %v", n.fail) break } } n.fail = 0 - ticker.Reset(time.Duration(n.timer) * time.Second) + ticker.Reset(time.Duration(n.timer) * time.Minute) if curT != n.timer { log.Println("updating nunwatch timer") ticker.Reset(time.Duration(n.timer) * time.Minute) + n.fail = 0 curT = n.timer }