]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: Call sc_conn_process() instead of .wake() callback function
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 16:30:26 +0000 (17:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Mar 2026 14:10:34 +0000 (15:10 +0100)
At we fail to create a mux, in conn_create_mux(), instead of calling the
app_ops .wake() callback function, we can directly call sc_conn_process().
At this stage, we know we are using an connection, so it is safe to do so.

include/haproxy/stconn.h
src/connection.c
src/stconn.c

index 4b8ffd675750a24e16f52fc692248e6ba7e20382..9a223a8d573712afa70c00b432c3c166e4f28851 100644 (file)
@@ -58,6 +58,7 @@ int sc_reset_endp(struct stconn *sc);
 
 struct appctx *sc_applet_create(struct stconn *sc, struct applet *app);
 int sc_applet_process(struct stconn *sc);
+int sc_conn_process(struct stconn *sc);
 
 void sc_conn_prepare_endp_upgrade(struct stconn *sc);
 void sc_conn_abort_endp_upgrade(struct stconn *sc);
index 445991421c2e44fec0d9966064fb2b4773d23bc9..9986885d4f4f7d3cfca6023a38125d241fa83e57 100644 (file)
@@ -141,7 +141,7 @@ int conn_create_mux(struct connection *conn, int *closed_connection)
 fail:
                /* let the upper layer know the connection failed */
                if (sc) {
-                       sc->app_ops->wake(sc);
+                       sc_conn_process(sc);
                }
                else if (conn_reverse_in_preconnect(conn)) {
                        struct listener *l = conn_active_reverse_listener(conn);
index c036a46128927c93f8e61fb49ad66ad4abbb199d..0a92b569dd89a3f33d38cb8deedd26f1c54e8fcd 100644 (file)
@@ -47,7 +47,6 @@ static void sc_app_shut_applet(struct stconn *sc);
 static void sc_app_chk_rcv_applet(struct stconn *sc);
 static void sc_app_chk_snd_applet(struct stconn *sc);
 
-static int sc_conn_process(struct stconn *sc);
 static int sc_conn_recv(struct stconn *sc);
 static int sc_conn_send(struct stconn *sc);