From 3d5f9e64a012b8d0f66ccf483e0e0e6eb3186787 Mon Sep 17 00:00:00 2001 From: Emmanuel Vasilakis Date: Wed, 18 Jan 2023 10:42:30 +0200 Subject: Revert health to run in a single thread (#14244) * revert health to single thread * remove getting now * use a health struct * remove commented code * cleanup health log from metdata * dont check for METADATA_UPDATE --- streaming/receiver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'streaming/receiver.c') diff --git a/streaming/receiver.c b/streaming/receiver.c index 53f8b7977d..6d2810cd60 100644 --- a/streaming/receiver.c +++ b/streaming/receiver.c @@ -449,7 +449,7 @@ bool rrdhost_set_receiver(RRDHOST *host, struct receiver_state *rpt) { if (rpt->config.health_enabled != CONFIG_BOOLEAN_NO) { if (rpt->config.alarms_delay > 0) { - host->health_delay_up_to = now_realtime_sec() + rpt->config.alarms_delay; + host->health.health_delay_up_to = now_realtime_sec() + rpt->config.alarms_delay; log_health( "[%s]: Postponing health checks for %" PRId64 " seconds, because it was just connected.", rrdhost_hostname(host), @@ -491,7 +491,7 @@ static void rrdhost_clear_receiver(struct receiver_state *rpt) { host->child_disconnected_time = now_realtime_sec(); if (rpt->config.health_enabled == CONFIG_BOOLEAN_AUTO) - host->health_enabled = 0; + host->health.health_enabled = 0; rrdpush_sender_thread_stop(host, "RECEIVER LEFT", false); -- cgit v1.2.3