]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stconn: Don't block sends if there is a pending shutdown
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 1 Sep 2023 12:13:44 +0000 (14:13 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 1 Sep 2023 12:18:26 +0000 (14:18 +0200)
For the same reason than the previous patch, we must not block the sends
when there is a pending shutdown. In other words, we must consider the sends
are allowed when there is a pending shutdown.

This patch must slowly be backported as far as 2.2. It should partially fix
issue #2249.

include/haproxy/sc_strm.h

index 7555fbf8a3d3215b079e0f65c8e258c9349be29e..8810d616a4a4af582b3b59221ef9cf83338a7e5c 100644 (file)
@@ -351,6 +351,8 @@ static inline int sc_is_send_allowed(const struct stconn *sc)
 {
        if (sc->flags & SC_FL_SHUT_DONE)
                return 0;
+       if (sc->flags & SC_FL_SHUT_WANTED)
+               return 1;
 
        return !sc_ep_test(sc, SE_FL_WAIT_DATA | SE_FL_WONT_CONSUME);
 }