From 08bd4bb284c924584d8bda6e72fcfb89002b5eb1 Mon Sep 17 00:00:00 2001 From: Timotej S <6674623+underhood@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:52:31 +0200 Subject: 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 --- streaming/rrdpush.c | 3 +++ streaming/sender.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'streaming') 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; } -- cgit v1.2.3