mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MINOR: stream: flag TASK_WOKEN_RES not set if task in runqueue
Under certain circumstances, if a stream's task is first woken up (eg: I/O event) then notified of the availability of a buffer it was waiting for via stream_res_wakeup(), this second event is lost because the flags are only merged after seeing that the task is running. At the moment it seems that the TASK_WOKEN_RES event is not explicitly checked for, but better fix this before getting reports of lost events. This fix removes this "task running" test which is properly performed in task_wakeup(), while the flags are properly merged. It must be backported to 1.7 and 1.6.
This commit is contained in:
parent
1af20c7161
commit
ff4491726f
@ -286,7 +286,7 @@ static void inline stream_init_srv_conn(struct stream *sess)
|
||||
* it returns 0. */
|
||||
static int inline stream_res_wakeup(struct stream *s)
|
||||
{
|
||||
if (s->task->state & TASK_RUNNING || task_in_rq(s->task))
|
||||
if (s->task->state & TASK_RUNNING)
|
||||
return 0;
|
||||
task_wakeup(s->task, TASK_WOKEN_RES);
|
||||
return 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user