BUG/MEDIUM: stream-int: Check if the conn_stream exist in si_cs_io_cb.

It is possible that the conn_stream gets detached from the stream_interface,
and as it subscribed to the wait list, si_cs_io_cb() gets called anyway,
so make sure we have a conn_stream before attempting to send more data.

This is 1.9-specific, no backport is needed.
This commit is contained in:
Olivier Houchard 2018-08-21 15:59:43 +02:00 committed by Willy Tarreau
parent abedf5f6c3
commit a6ff035770

View File

@ -760,8 +760,12 @@ wake_others:
struct task *si_cs_io_cb(struct task *t, void *ctx, unsigned short state)
{
struct stream_interface *si = ctx;
struct conn_stream *cs = objt_cs(si->end);
if (!cs)
return NULL;
if (!(si->wait_list.wait_reason & SUB_CAN_SEND))
si_cs_send(__objt_cs(si->end));
si_cs_send(cs);
return (NULL);
}