From 6cbd21542cf7a751e6f0f38864e7e9eae8fa3b14 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 27 Oct 2026 21:32:24 +0100 Subject: Plug in the new per-thread stats counter, also make sure that the ot_clean sleep does not stall tracker exit --- ot_fullscrape.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ot_fullscrape.c') diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 8518bd2..a86d6d7 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c @@ -55,6 +55,8 @@ static void *fullscrape_worker(void *args) { while (g_opentracker_running) { ot_tasktype tasktype = TASK_FULLSCRAPE; ot_taskid taskid = mutex_workqueue_poptask(&tasktype); + if (!taskid) + break; #ifdef WANT_COMPRESSION_ZSTD if (tasktype & TASK_FLAG_ZSTD) fullscrape_make_zstd(taskid, tasktype); @@ -77,7 +79,8 @@ void fullscrape_init(void) { } void fullscrape_deinit(void) { - pthread_cancel( thread_id ); + mutex_workqueue_wakeall(); + pthread_join( thread_id, NULL ); } void fullscrape_deliver( int64_t sock, ot_tasktype tasktype ) { -- cgit v1.3