From 7927d2f2dc90c5ade4db2ee4c1e7dc50f0357d51 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Mon, 21 Dec 2020 19:40:16 +0100 Subject: [PATCH] BUG/MEDIUM: mux_h2: Add missing braces in h2_snd_buf()around trace+wakeup This is a regression in 7838a79ba ("MEDIUM: mux-h2/trace: add lots of traces all over the code"). The issue was found using -Wmisleading-indentation. This patch fixes GitHub issue #1015. The impact of this bug is that it could in theory cause occasional delays on some long responses for connections having otherwise no traffic. This patch should be backported to 2.1+, the commit was first tagged in v2.1-dev2. (cherry picked from commit 12a08d8849166ec0a779bbdee2ce9d768d5aa824) Signed-off-by: Christopher Faulet (cherry picked from commit 6dca14490dffcd7aff69b71d3fefbf3b3dcf7c12) Signed-off-by: Christopher Faulet (cherry picked from commit 769ba9391e77ebf3492a1910b6273090bbeb81c8) Signed-off-by: Christopher Faulet --- src/mux_h2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 1a97fd3..ab2ce47 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -5964,9 +5964,10 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun } if (total > 0) { - if (!(h2s->h2c->wait_event.events & SUB_RETRY_SEND)) + if (!(h2s->h2c->wait_event.events & SUB_RETRY_SEND)) { TRACE_DEVEL("data queued, waking up h2c sender", H2_EV_H2S_SEND|H2_EV_H2C_SEND, h2s->h2c->conn, h2s); tasklet_wakeup(h2s->h2c->wait_event.tasklet); + } } /* If we're waiting for flow control, and we got a shutr on the -- 1.7.10.4