diff --git a/include/proto/task.h b/include/proto/task.h index a1aa0ffb8..bd2fe4cbb 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -365,8 +365,10 @@ static inline void task_free(struct task *t) static inline void tasklet_free(struct tasklet *tl) { - if (!LIST_ISEMPTY(&tl->list)) + if (!LIST_ISEMPTY(&tl->list)) { task_per_thread[tid].task_list_size--; + HA_ATOMIC_SUB(&tasks_run_queue, 1); + } LIST_DEL(&tl->list); pool_free(pool_head_tasklet, tl);