diff --git a/src/task.c b/src/task.c index 102462eb8f..ea3d808308 100644 --- a/src/task.c +++ b/src/task.c @@ -96,8 +96,7 @@ void task_kill(struct task *t) thr = my_ffsl(t->thread_mask) - 1; /* Beware: tasks that have never run don't have their ->list empty yet! */ - LIST_INIT(&((struct tasklet *)t)->list); - MT_LIST_TRY_ADDQ(&task_per_thread[thr].shared_tasklet_list, + MT_LIST_ADDQ(&task_per_thread[thr].shared_tasklet_list, (struct mt_list *)&((struct tasklet *)t)->list); _HA_ATOMIC_ADD(&tasks_run_queue, 1); _HA_ATOMIC_ADD(&task_per_thread[thr].task_list_size, 1);