]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Call sc_conn_process from the I/O callback if TASK_WOKEN_MSG state...
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 14:22:50 +0000 (15:22 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Mar 2026 14:10:34 +0000 (15:10 +0100)
It is the first commit of a series to refactor the SC app_ops. The first
step is to remove the .wake() callback function from the app_ops to replace
all uses by a wakeup of the SC tasklet.

Here, when the SC is woken up, the state is now tested and if TASK_WOKEN_MSG
is set, sc_conn_process() is called.

src/stconn.c

index a07aa98f64415c30828a293584e4d062af23ba3d..10ca9d865137ca7a8e1f608f7baed62c3c70941d 100644 (file)
@@ -1982,7 +1982,7 @@ struct task *sc_conn_io_cb(struct task *t, void *ctx, unsigned int state)
                ret = sc_conn_send(sc);
        if (!(sc->wait_event.events & SUB_RETRY_RECV))
                ret |= sc_conn_recv(sc);
-       if (ret != 0)
+       if (ret != 0 || (state & TASK_WOKEN_MSG))
                sc_conn_process(sc);
 
        stream_release_buffers(__sc_strm(sc));