summaryrefslogtreecommitdiffstats
path: root/streaming
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-02-01 00:05:45 +0200
committerGitHub <noreply@github.com>2020-02-01 00:05:45 +0200
commit177af26ea878e673166ebbeb4518539f624a81f0 (patch)
tree9f874527a1e6e25c85a05d62b3623e6d8b5f79fd /streaming
parent43bc627b1dc2e667ad2e6e8a0c2ff1e0b512dcdf (diff)
Parse host tags (#7702)
* Fix memory leaks * Check for configuration options * Parse simple tags * Parse JSON tags * Remove an unnecessary check * Parse a JSON object * Parse a JSON array * Update the documentation * Fix host locks
Diffstat (limited to 'streaming')
-rw-r--r--streaming/rrdpush.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index f110a4c92a..59ae0b1537 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -347,6 +347,7 @@ void rrdpush_send_labels(RRDHOST *host) {
return;
rrdpush_buffer_lock(host);
+ rrdhost_rdlock(host);
netdata_rwlock_rdlock(&host->labels_rwlock);
struct label *labels = host->labels;
@@ -364,6 +365,7 @@ void rrdpush_send_labels(RRDHOST *host) {
, "OVERWRITE %s\n", "labels");
netdata_rwlock_unlock(&host->labels_rwlock);
+ rrdhost_unlock(host);
if(host->rrdpush_sender_pipe[PIPE_WRITE] != -1 && write(host->rrdpush_sender_pipe[PIPE_WRITE], " ", 1) == -1)
error("STREAM %s [send]: cannot write to internal pipe", host->hostname);