summaryrefslogtreecommitdiffstats
path: root/aclk
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2021-11-05 12:42:22 +0100
committerGitHub <noreply@github.com>2021-11-05 12:42:22 +0100
commit6d0c55b7710c8d539d72ae6b915184d6b397e455 (patch)
treec40f38ce008460206995e87da79c3b04793e1c56 /aclk
parent3447be367e37a9644bff7e7233648601d99409a6 (diff)
dont extend popcorn timer for children (#11758)
Diffstat (limited to 'aclk')
-rw-r--r--aclk/aclk.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/aclk/aclk.c b/aclk/aclk.c
index 26ce5bc54c..48bfdf7590 100644
--- a/aclk/aclk.c
+++ b/aclk/aclk.c
@@ -323,6 +323,17 @@ static int handle_connection(mqtt_wss_client client)
return 0;
}
+inline static int aclk_popcorn_check()
+{
+ ACLK_SHARED_STATE_LOCK;
+ if (unlikely(aclk_shared_state.agent_state == ACLK_HOST_INITIALIZING)) {
+ ACLK_SHARED_STATE_UNLOCK;
+ return 1;
+ }
+ ACLK_SHARED_STATE_UNLOCK;
+ return 0;
+}
+
inline static int aclk_popcorn_check_bump()
{
ACLK_SHARED_STATE_LOCK;
@@ -850,7 +861,7 @@ int ng_aclk_update_chart(RRDHOST *host, char *chart_name, int create)
{
struct aclk_query *query;
- if (aclk_popcorn_check_bump())
+ if (host == localhost ? aclk_popcorn_check_bump() : aclk_popcorn_check())
return 0;
query = aclk_query_new(create ? CHART_NEW : CHART_DEL);