@cryptotaxi247 / netdata-1 / commits / 07059e6b6

fix has_receiver condition in rrdhost_status() (#19014)

Costa Tsaousis committed Nov 14, 2024 at 14:13 UTC 07059e6b64064bf32dc595f4b82a2e7a3c05a80e
1 file changed +2 -2
src/streaming/rrdhost-status.c
+2 -2
@@ -185,7 +185,7 @@ void rrdhost_status(RRDHOST *host, time_t now, RRDHOST_STATUS *s) {
185 spinlock_lock(&host->receiver_lock);
186 s->ingest.hops = (host->system_info ? host->system_info->hops : (host == localhost) ? 0 : 1);
187 bool has_receiver = false;
188 - if (host->receiver) {
188 + if (host->receiver && !rrdhost_flag_check(host, RRDHOST_FLAG_RRDPUSH_RECEIVER_DISCONNECTED)) {
189 has_receiver = true;
190 s->ingest.replication.instances = rrdhost_receiver_replicating_charts(host);
191 s->ingest.replication.completion = host->rrdpush_receiver_replication_percent;
@@ -224,7 +224,7 @@ void rrdhost_status(RRDHOST *host, time_t now, RRDHOST_STATUS *s) {
224
225 if(host == localhost)
226 s->ingest.type = RRDHOST_INGEST_TYPE_LOCALHOST;
227 - else if(has_receiver || !rrdhost_flag_check(host, RRDHOST_FLAG_RRDPUSH_RECEIVER_DISCONNECTED))
227 + else if(has_receiver)
228 s->ingest.type = RRDHOST_INGEST_TYPE_CHILD;
229 else if(rrdhost_option_check(host, RRDHOST_OPTION_VIRTUAL_HOST))
230 s->ingest.type = RRDHOST_INGEST_TYPE_VIRTUAL;