From: Christopher Faulet Date: Fri, 14 Jun 2019 14:54:15 +0000 (+0200) Subject: BUG/MINOR: mux-h1: Wake busy mux for I/O when message is fully sent X-Git-Tag: v2.0.0~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd67bffd26561e748f897efba589425ac659f1d9;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Wake busy mux for I/O when message is fully sent If a mux is in busy mode when the outgoing EOM is consummed, it is important to wake it up for I/O. Because in busy mode, the mux is not subscribed for receive. Otherwise, it depends on the applicative layer to shutdown the H1 stream. Wake it up allows the mux to catch the read0 as soon as possible. This patch must be backported to 1.9. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 0273f881f5..317f1a55c5 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1733,6 +1733,10 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun goto error; done: h1m->state = H1_MSG_DONE; + if (h1s->h1c->flags & H1C_F_IN_BUSY) { + h1s->h1c->flags &= ~H1C_F_IN_BUSY; + tasklet_wakeup(h1s->h1c->wait_event.tasklet); + } break; default: