]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stconn: Don't forget to wakeup applets on shutdown
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Mar 2026 06:33:21 +0000 (07:33 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Mar 2026 06:38:57 +0000 (07:38 +0100)
When SC's shudown callback functions were merged, a regression was
introduced. The applet was no longer woken up. Because of this bug, an
applet could remain blocked, waiting for an I/O event or a timeout.

This patch should fix the issue #3301.

No backport needed.

src/stconn.c

index 82c7ed8f2c120f22b368605acc2af6f3b53fb36a..68ca7afea6959b85a41333cee83ec00e3f7604f5 100644 (file)
@@ -621,6 +621,11 @@ void sc_shutdown(struct stconn *sc)
        sc_set_hcto(sc);
        sc_report_term_evt(sc, strm_tevt_type_shutw);
 
+       if (sc_ep_test(sc, SE_FL_T_APPLET)) {
+               /* on shutw we always wake the applet up */
+               appctx_wakeup(__sc_appctx(sc));
+       }
+
        switch (sc->state) {
        case SC_ST_RDY:
        case SC_ST_EST: