diff options
Diffstat (limited to 'ot_fullscrape.c')
| -rw-r--r-- | ot_fullscrape.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) { | |||
| 55 | while (g_opentracker_running) { | 55 | while (g_opentracker_running) { |
| 56 | ot_tasktype tasktype = TASK_FULLSCRAPE; | 56 | ot_tasktype tasktype = TASK_FULLSCRAPE; |
| 57 | ot_taskid taskid = mutex_workqueue_poptask(&tasktype); | 57 | ot_taskid taskid = mutex_workqueue_poptask(&tasktype); |
| 58 | if (!taskid) | ||
| 59 | break; | ||
| 58 | #ifdef WANT_COMPRESSION_ZSTD | 60 | #ifdef WANT_COMPRESSION_ZSTD |
| 59 | if (tasktype & TASK_FLAG_ZSTD) | 61 | if (tasktype & TASK_FLAG_ZSTD) |
| 60 | fullscrape_make_zstd(taskid, tasktype); | 62 | fullscrape_make_zstd(taskid, tasktype); |
| @@ -77,7 +79,8 @@ void fullscrape_init(void) { | |||
| 77 | } | 79 | } |
| 78 | 80 | ||
| 79 | void fullscrape_deinit(void) { | 81 | void fullscrape_deinit(void) { |
| 80 | pthread_cancel( thread_id ); | 82 | mutex_workqueue_wakeall(); |
| 83 | pthread_join( thread_id, NULL ); | ||
| 81 | } | 84 | } |
| 82 | 85 | ||
| 83 | void fullscrape_deliver( int64_t sock, ot_tasktype tasktype ) { | 86 | void fullscrape_deliver( int64_t sock, ot_tasktype tasktype ) { |
