diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-04-20 19:16:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-20 19:16:00 +0000 |
commit | 4edec08f4e21f0f6a719241406b3df09aa55b1ad (patch) | |
tree | 2032922e346cba9d461e1d2d745c78b2244e3607 /collectors/plugins.d | |
parent | 34760ba51f22859526dc478c784b6163902004fe (diff) |
fix_lock: Add the missing lock (#8780)
This PR adds the missing lock and fix a master shutdown during streaming.
Diffstat (limited to 'collectors/plugins.d')
-rw-r--r-- | collectors/plugins.d/plugins_d.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/collectors/plugins.d/plugins_d.c b/collectors/plugins.d/plugins_d.c index ddccd939f2..3e8290b3d2 100644 --- a/collectors/plugins.d/plugins_d.c +++ b/collectors/plugins.d/plugins_d.c @@ -655,7 +655,9 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int if(!host->labels) { host->labels = new_labels; } else { + rrdhost_rdlock(host); replace_label_list(host, new_labels); + rrdhost_unlock(host); } new_labels = NULL; |