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.
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
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) |