diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-12-21 16:55:15 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 16:55:15 +0700 |
commit | fe386aad57f24574783f4c68bab433a5cdfe6f64 (patch) | |
tree | 515cf85f9a75cdc098a31aedc50c0ea82573d425 | |
parent | 30cb2eca12ff39502bc9b46cc46dc7b08828dacf (diff) |
Fix race on query thread startup (#14164)
fixes race on startup of query threads
-rw-r--r-- | aclk/aclk_query.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/aclk/aclk_query.c b/aclk/aclk_query.c index 5301c281ff..249e2b5363 100644 --- a/aclk/aclk_query.c +++ b/aclk/aclk_query.c @@ -359,14 +359,13 @@ void aclk_query_threads_start(struct aclk_query_threads *query_threads, mqtt_wss query_threads->thread_list = callocz(query_threads->count, sizeof(struct aclk_query_thread)); for (int i = 0; i < query_threads->count; i++) { query_threads->thread_list[i].idx = i; //thread needs to know its index for statistics + query_threads->thread_list[i].client = client; if(unlikely(snprintfz(thread_name, TASK_LEN_MAX, "%s_%d", ACLK_QUERY_THREAD_NAME, i) < 0)) error("snprintf encoding error"); netdata_thread_create( &query_threads->thread_list[i].thread, thread_name, NETDATA_THREAD_OPTION_JOINABLE, aclk_query_main_thread, &query_threads->thread_list[i]); - - query_threads->thread_list[i].client = client; } } |