From: Christopher Faulet Date: Fri, 4 Oct 2019 08:22:47 +0000 (+0200) Subject: MINOR: mux-h1: Try to wakeup the stream on output buffer allocation X-Git-Tag: v2.1-dev3~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=660f6f34d7e6b64ed5cd7086b491a8113c7f8767;p=thirdparty%2Fhaproxy.git MINOR: mux-h1: Try to wakeup the stream on output buffer allocation When the output buffer allocation failed, we block stream processing. When finally a buffer is available and we succed to allocate the output buffer, it seems fair to wake up the stream. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 60461a819a..6bf6d3c95d 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -251,6 +251,8 @@ static int h1_process(struct h1c *h1c); static struct task *h1_io_cb(struct task *t, void *ctx, unsigned short state); static void h1_shutw_conn(struct connection *conn, enum cs_shw_mode mode); static struct task *h1_timeout_task(struct task *t, void *context, unsigned short state); +static void h1_wake_stream_for_recv(struct h1s *h1s); +static void h1_wake_stream_for_send(struct h1s *h1s); /* the H1 traces always expect that arg1, if non-null, is of type connection * (from which we can derive h1c), that arg2, if non-null, is of type h1s, and @@ -402,6 +404,8 @@ static int h1_buf_available(void *target) TRACE_STATE("unblocking h1s, obuf allocated", H1_EV_TX_DATA|H1_EV_H1S_BLK|H1_EV_STRM_WAKE, h1c->conn, h1c->h1s); h1c->flags &= ~H1C_F_OUT_ALLOC; tasklet_wakeup(h1c->wait_event.tasklet); + if (h1c->h1s) + h1_wake_stream_for_send(h1c->h1s); return 1; }