mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MEDIUM: tasks: Don't account a destroyed task as a runned task.
In process_runnable_tasks(), if the task we're about to run has been destroyed, and should be free, don't account for it in the number of task we ran. We're only allowed a maximum number of tasks to run per call to process_runnable_tasks(), and freeing one shouldn't take the slot of a valid task.
This commit is contained in:
parent
3f795f76e8
commit
1cfac37b65
@ -388,7 +388,12 @@ void process_runnable_tasks()
|
||||
t = process(TASK_IS_TASKLET(t) ? NULL : t, ctx, state);
|
||||
else {
|
||||
__task_free(t);
|
||||
t = NULL;
|
||||
curr_task = NULL;
|
||||
/* We don't want max_processed to be decremented if
|
||||
* we're just freeing a destroyed task, we should only
|
||||
* do so if we really ran a task.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
curr_task = NULL;
|
||||
/* If there is a pending state we have to wake up the task
|
||||
|
Loading…
Reference in New Issue
Block a user