From: Olivier Houchard Date: Wed, 15 Jan 2020 18:13:32 +0000 (+0100) Subject: BUG/MEDIUM: mux_h1: Don't call h1_send if we subscribed(). X-Git-Tag: v2.2-dev1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68787ef70a2e0fe19d0ab753dab8ed5c90cb4398;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux_h1: Don't call h1_send if we subscribed(). In h1_snd_buf(), only attempt to call h1_send() if we haven't already subscribed. It makes no sense to do it if we subscribed, as we know we failed to send before, and will create a useless call to sendto(), and in 2.2, the call to raw_sock_from_buf() will disable polling if it is enabled. This should be backported to 2.2, 2.1, 2.0 and 1.9. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index e68b50c927..59446d1944 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2672,7 +2672,7 @@ static size_t h1_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun break; total += ret; count -= ret; - if (!h1_send(h1c)) + if ((h1c->wait_event.events & SUB_RETRY_SEND) || !h1_send(h1c)) break; }