summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2021-03-24 08:15:42 +0000
committerGitHub <noreply@github.com>2021-03-24 11:15:42 +0300
commita66e9ef6a7e99eb968a76074fd827b3da6d55da4 (patch)
tree5f78a511c99ebbbd0e5c888b0c15264109ddd1d0 /health
parentd2030d0241ec30a372c84656ff6a7bc3fe0c9e81 (diff)
fix_repeat: Update repeat_every and avoid unecessary test (#10846)
Diffstat (limited to 'health')
-rw-r--r--health/health.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/health/health.c b/health/health.c
index b81361e8a2..0793100a6a 100644
--- a/health/health.c
+++ b/health/health.c
@@ -966,12 +966,14 @@ void *health_main(void *ptr) {
} else if(unlikely(rc->status == RRDCALC_STATUS_CLEAR)) {
if(!(rc->rrdcalc_flags & RRDCALC_FLAG_RUN_ONCE)) {
if(rc->old_status == RRDCALC_STATUS_CRITICAL) {
- repeat_every = rc->crit_repeat_every;
+ repeat_every = 1;
} else if (rc->old_status == RRDCALC_STATUS_WARNING) {
- repeat_every = rc->warn_repeat_every;
+ repeat_every = 1;
}
}
}
+ } else {
+ continue;
}
if(unlikely(repeat_every > 0 && (rc->last_repeat + repeat_every) <= now)) {