]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stconn: Report read activity when a stream is attached to front SC
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Sep 2023 06:46:15 +0000 (08:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Sep 2023 07:29:27 +0000 (09:29 +0200)
It only concerns the front SC. But it is important to report a read activity
when a stream is created and attached to the front SC, especially in TCP. In
HTTP, when this happens, the request was necessarily received. But in TCP,
the client may open a connection without sending anything. We must still
report a first read activity in this case to be able to properly report
client timeout.

This patch must be backported to 2.8.

src/stconn.c

index 68313cd8d67f88b47a236788d2fb17b8cdd62306..27544645c4b80b771f999ff3c9c62185ad0e3a33 100644 (file)
@@ -322,6 +322,7 @@ int sc_attach_strm(struct stconn *sc, struct stream *strm)
 {
        sc->app = &strm->obj_type;
        sc_ep_clr(sc, SE_FL_ORPHAN);
+       sc_ep_report_read_activity(sc);
        if (sc_ep_test(sc, SE_FL_T_MUX)) {
                sc->wait_event.tasklet = tasklet_new();
                if (!sc->wait_event.tasklet)