]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Remove half-closed timeout
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Feb 2023 07:41:55 +0000 (08:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Feb 2023 14:59:16 +0000 (15:59 +0100)
The half-closed timeout is now directly retrieved from the proxy
settings. There is no longer usage for the .hcto field in the stconn
structure. So let's remove it.

include/haproxy/stconn-t.h
src/cli.c
src/proxy.c
src/stconn.c
src/stream.c

index 019533b0bb537dbf109cb81a2b4c0a4b2f5ac6e1..8baf965acdd5a794c6386156ab7dda4292737abd 100644 (file)
@@ -241,7 +241,6 @@ struct stconn {
        /* 2 bytes hole here */
 
        unsigned int flags;                  /* SC_FL_* */
-       unsigned int hcto;                   /* half-closed timeout (0 = unset) */
        unsigned int ioto;                   /* I/O activity timeout */
        struct wait_event wait_event;        /* We're in a wait list */
        struct sedesc *sedesc;               /* points to the stream endpoint descriptor */
index af45c27d2ddaf3c0ce571773179262e223997f31..cf39cb68032a114493920e9bbcd8f98189a93d18 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -2830,8 +2830,6 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                s->req.analyse_exp = TICK_ETERNITY;
                s->res.analyse_exp = TICK_ETERNITY;
 
-               s->scb->hcto = TICK_ETERNITY;
-
                /* we're removing the analysers, we MUST re-enable events detection.
                 * We don't enable close on the response channel since it's either
                 * already closed, or in keep-alive with an idle connection handler.
index a021224d6373208594c488b95c5641a50589305f..404037d80bbb4f558175097859a8a0c034e5a2f1 100644 (file)
@@ -2404,9 +2404,6 @@ int stream_set_backend(struct stream *s, struct proxy *be)
        if (be->options2 & PR_O2_INDEPSTR)
                s->scb->flags |= SC_FL_INDEP_STR;
 
-       if (tick_isset(be->timeout.serverfin))
-               s->scb->hcto = be->timeout.serverfin;
-
        /* We want to enable the backend-specific analysers except those which
         * were already run as part of the frontend/listener. Note that it would
         * be more reliable to store the list of analysers that have been run,
index 6cf4830ceacbc0b2b3e401722636c49b53071720..3c19cfc38c54cb6e1dce39bce158daa97a33fa20 100644 (file)
@@ -135,7 +135,7 @@ static struct stconn *sc_new(struct sedesc *sedesc)
        sc->obj_type = OBJ_TYPE_SC;
        sc->flags = SC_FL_NONE;
        sc->state = SC_ST_INI;
-       sc->ioto = sc->hcto = TICK_ETERNITY;
+       sc->ioto = TICK_ETERNITY;
        sc->app = NULL;
        sc->app_ops = NULL;
        sc->src = NULL;
index 533c3ee9b9f836f8d2775cc9240fbed1da11b16d..28bb9866843f547795de36b44d2672fdb9af5b7e 100644 (file)
@@ -478,12 +478,10 @@ struct stream *stream_new(struct session *sess, struct stconn *sc, struct buffer
                goto out_fail_alloc_scb;
 
        sc_set_state(s->scf, SC_ST_EST);
-       s->scf->hcto = sess->fe->timeout.clientfin;
 
        if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
                s->scf->flags |= SC_FL_INDEP_STR;
 
-       s->scb->hcto = TICK_ETERNITY;
        if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
                s->scb->flags |= SC_FL_INDEP_STR;