diff --git a/include/proto/task.h b/include/proto/task.h index 469067046..35d77dacc 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -32,6 +32,7 @@ #include #include +#include #include /* Principle of the wait queue. @@ -199,6 +200,8 @@ static inline struct task *task_new(void) static inline void task_free(struct task *t) { pool_free2(pool2_task, t); + if (unlikely(stopping)) + pool_flush2(pool2_task); nb_tasks--; }