mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-14 03:22:06 +01:00
BUG/MEDIUM: stream: Handle TASK_WOKEN_RES as a stream event
The conversion of TASK_WOKEN_RES to a stream event was missing. Among other things, this wakeup reason is used when a stream is dequeued. So it was possible to skip the connection establishment if the stream was also woken up for a timer reason. When this happened, the stream was blocked till the queue timeout expiration. Converting TASK_WOKEN_RES to STRM_EVT_RES fixes the issue. This patch should fix the issue #3290. It must be backported as far as 3.2.
This commit is contained in:
parent
f41e684e9a
commit
13c3445163
@ -180,6 +180,7 @@ enum {
|
||||
STRM_EVT_SHUT_SRV_DOWN = 0x00000004, /* Must be shut because the selected server became available */
|
||||
STRM_EVT_SHUT_SRV_UP = 0x00000008, /* Must be shut because a preferred server became available */
|
||||
STRM_EVT_KILLED = 0x00000010, /* Must be shut for external reason */
|
||||
STRM_EVT_RES = 0x00000020, /* A requested resource is available (a buffer, a conn_slot...) */
|
||||
};
|
||||
|
||||
/* This function is used to report flags in debugging tools. Please reflect
|
||||
|
||||
@ -412,6 +412,7 @@ static inline void stream_shutdown(struct stream *s, int why)
|
||||
static inline unsigned int stream_map_task_state(unsigned int state)
|
||||
{
|
||||
return ((state & TASK_WOKEN_TIMER) ? STRM_EVT_TIMER : 0) |
|
||||
((state & TASK_WOKEN_RES) ? STRM_EVT_RES : 0) |
|
||||
((state & TASK_WOKEN_MSG) ? STRM_EVT_MSG : 0) |
|
||||
((state & TASK_F_UEVT1) ? STRM_EVT_SHUT_SRV_DOWN : 0) |
|
||||
((state & TASK_F_UEVT3) ? STRM_EVT_SHUT_SRV_UP : 0) |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user