]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stconn/mux-h1: Fix suspect change causing timeouts
authorWilliam Manley <will@stb-tester.com>
Wed, 5 Jun 2024 20:55:11 +0000 (21:55 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jun 2024 12:06:35 +0000 (14:06 +0200)
commit52eb6b23f81d8663ebc6b2fe5d9996916c05ed8f
treecd825b4de7f3b03c7d438649f5bb9cc3c2b7f14f
parent0ef94e2dff873c0755584d0797c81e1b2c697e52
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
d2c3f8dde7c2474616c0ea51234e6ba9433a4bc1: "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]
src/mux_h1.c