Skip to content

Commit 913b7b6

Browse files
wmanleycapflam
authored andcommitted
BUG/MEDIUM: stconn/mux-h1: Fix suspect change causing timeouts
This fixes an issue I've had where if a connection was idle for ~23s it would get in a bad state. I don't understand this code, so I'm not sure exactly why it was failing. I discovered this by bisecting to identify the commit that caused the regression between 2.9 and 3.0. The commit is d2c3f8d: "MINOR: stconn/connection: Move shut modes at the SE descriptor level" - a part of v3.0-dev8. It seems to be an innocent renaming, so I looked through it and this stood out as suspect: - if (mode != CO_SHW_NORMAL) + if (mode & SE_SHW_NORMAL) It looks like the not went missing here, so this patch reverses that condition. It fixes my test. I don't quite understand what this is doing or is for so I can't write a regression test or decent commit message. Hopefully someone else will be able to pick this up from where I've left it. [CF: This inverts the condition to perform clean shutdowns. This means no clean shutdown are performed when it should do. This patch must be backported to 3.0] (cherry picked from commit 52eb6b2) Signed-off-by: Christopher Faulet <[email protected]>
1 parent 0a360df commit 913b7b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mux_h1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4376,7 +4376,7 @@ static void h1_shut(struct stconn *sc, enum se_shut_mode mode, struct se_abort_i
43764376

43774377
do_shutw:
43784378
h1_close(h1c);
4379-
if (mode & SE_SHW_NORMAL)
4379+
if (!(mode & SE_SHW_NORMAL))
43804380
h1c->flags |= H1C_F_SILENT_SHUT;
43814381

43824382
if (!b_data(&h1c->obuf))

0 commit comments

Comments
 (0)