summaryrefslogtreecommitdiffstats
path: root/streaming
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2020-08-27 14:52:31 +0200
committerGitHub <noreply@github.com>2020-08-27 14:52:31 +0200
commit08bd4bb284c924584d8bda6e72fcfb89002b5eb1 (patch)
tree39f9e161d2e4ba2338d28fc6dcee6941fe5351b7 /streaming
parent13e73092545364f2a31b53c0d83fe2c6f1770218 (diff)
fixes proxy forwarding claim_id to old parent (#9828)
when v3 child reloads claim state while connected to v3 proxy the proxy forwarded it to parent despite it being v2
Diffstat (limited to 'streaming')
-rw-r--r--streaming/rrdpush.c3
-rw-r--r--streaming/sender.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index a9e75d4ccf..65ca18b5b7 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -369,6 +369,9 @@ void rrdpush_claimed_id(RRDHOST *host)
{
if(unlikely(!host->rrdpush_send_enabled || !host->rrdpush_sender_connected))
return;
+
+ if(host->sender->version < STREAM_VERSION_CLAIM)
+ return;
sender_start(host->sender);
netdata_mutex_lock(&host->claimed_id_lock);
diff --git a/streaming/sender.c b/streaming/sender.c
index c48f9b3e06..a70d06100d 100644
--- a/streaming/sender.c
+++ b/streaming/sender.c
@@ -622,8 +622,7 @@ void *rrdpush_sender_thread(void *ptr) {
buffer_sprintf(s->build, "TIMESTAMP %ld", now);
sender_commit(s);
}
- if (s->version >= STREAM_VERSION_CLAIM)
- rrdpush_claimed_id(s->host);
+ rrdpush_claimed_id(s->host);
continue;
}