Skip to content

Commit 5c035ab

Browse files
ktsaouAncairon
authored andcommitted
fix has_receiver condition in rrdhost_status() (netdata#19014)
1 parent 11254cd commit 5c035ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/streaming/rrdhost-status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void rrdhost_status(RRDHOST *host, time_t now, RRDHOST_STATUS *s) {
185185
spinlock_lock(&host->receiver_lock);
186186
s->ingest.hops = (host->system_info ? host->system_info->hops : (host == localhost) ? 0 : 1);
187187
bool has_receiver = false;
188-
if (host->receiver) {
188+
if (host->receiver && !rrdhost_flag_check(host, RRDHOST_FLAG_RRDPUSH_RECEIVER_DISCONNECTED)) {
189189
has_receiver = true;
190190
s->ingest.replication.instances = rrdhost_receiver_replicating_charts(host);
191191
s->ingest.replication.completion = host->rrdpush_receiver_replication_percent;
@@ -224,7 +224,7 @@ void rrdhost_status(RRDHOST *host, time_t now, RRDHOST_STATUS *s) {
224224

225225
if(host == localhost)
226226
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)
228228
s->ingest.type = RRDHOST_INGEST_TYPE_CHILD;
229229
else if(rrdhost_option_check(host, RRDHOST_OPTION_VIRTUAL_HOST))
230230
s->ingest.type = RRDHOST_INGEST_TYPE_VIRTUAL;

0 commit comments

Comments
 (0)