From ae834c560cd2f228384c06ceaff97dd864d1e2ab Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 20 May 2024 21:38:59 -0500 Subject: [PATCH] Reset count to 0 even if it was low Otherwise we'll just go straight to sending the error next time instead of waiting for two. --- cmd/cron/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cron/main.go b/cmd/cron/main.go index e5aa39d..31b193a 100644 --- a/cmd/cron/main.go +++ b/cmd/cron/main.go @@ -102,9 +102,9 @@ func main() { publish(host, fmt.Sprintf("Certificate check failed for %s: possible MITM or you changed your public key", host)) } else { log.Printf("Success for %s\n", host) + rclient.HSet(context.Background(), "mitm_monitor_hosts", host, 0) errCountI, _ := strconv.Atoi(errCount) if errCountI > 1 { - rclient.HSet(context.Background(), "mitm_monitor_hosts", host, 0) publish(host, fmt.Sprintf("Certificate checks passed for %s", host)) } } -- 2.45.2