]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Use SC to detect frontend connections in sc_conn_recv()
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 13 Nov 2023 18:17:32 +0000 (19:17 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Nov 2023 10:01:51 +0000 (11:01 +0100)
In sc_conn_recv(), instead of using the connection to know we are on the
frontend side, we now use the SC flags. It changes nothing but it is
cleaner.

src/stconn.c

index 46ce76bea7e490b1e62b5618d7adb27130986f61..c768bc8ff31196ab1bf4619d9cc69c957c536042 100644 (file)
@@ -1327,7 +1327,7 @@ static int sc_conn_recv(struct stconn *sc)
        }
 
        /* Instruct the mux it must subscribed for read events */
-       if (!conn_is_back(conn) &&                                 /* for frontend conns only */
+       if (!(sc->flags & SC_FL_ISBACK) &&                         /* for frontend conns only */
            (sc_opposite(sc)->state != SC_ST_INI) &&               /* before backend connection setup */
            (__sc_strm(sc)->be->options & PR_O_ABRT_CLOSE))        /* if abortonclose option is set for the current backend */
                flags |= CO_RFL_KEEP_RECV;