diff --git a/include/proto/task.h b/include/proto/task.h index 53119b9d0..68a0a18d1 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -248,7 +248,7 @@ static inline void tasklet_wakeup(struct tasklet *tl) if (tl->state & TASK_SELF_WAKING) { LIST_ADDQ(&task_per_thread[tid].tasklets[TL_BULK], &tl->list); } - else if (tl->state & TASK_RUNNING) { + else if ((struct task *)tl == sched->current) { _HA_ATOMIC_OR(&tl->state, TASK_SELF_WAKING); LIST_ADDQ(&task_per_thread[tid].tasklets[TL_BULK], &tl->list); }