From: Christopher Faulet Date: Mon, 13 Nov 2023 18:17:32 +0000 (+0100) Subject: MINOR: stconn: Use SC to detect frontend connections in sc_conn_recv() X-Git-Tag: v2.9-dev10~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec3ea6f69837de9965b14a5c593b0302a1d5bd3d;p=thirdparty%2Fhaproxy.git MINOR: stconn: Use SC to detect frontend connections in sc_conn_recv() 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. --- diff --git a/src/stconn.c b/src/stconn.c index 46ce76bea7..c768bc8ff3 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -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;