diff --git a/include/haproxy/sc_strm.h b/include/haproxy/sc_strm.h index 8dc0d84b39..7555fbf8a3 100644 --- a/include/haproxy/sc_strm.h +++ b/include/haproxy/sc_strm.h @@ -389,6 +389,9 @@ static inline void sc_set_hcto(struct stconn *sc) { struct stream *strm = __sc_strm(sc); + if (IS_HTX_STRM(strm)) + return; + if (sc->flags & SC_FL_ISBACK) { if ((strm->flags & SF_BE_ASSIGNED) && tick_isset(strm->be->timeout.serverfin)) sc->ioto = strm->be->timeout.serverfin; diff --git a/src/stream.c b/src/stream.c index 4bcc545a15..ef35b6e3c7 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2453,10 +2453,12 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) if (!req->analysers && s->tunnel_timeout) { scf->ioto = scb->ioto = s->tunnel_timeout; - if ((scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) && tick_isset(sess->fe->timeout.clientfin)) - scf->ioto = sess->fe->timeout.clientfin; - if ((scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) && tick_isset(s->be->timeout.serverfin)) - scb->ioto = s->be->timeout.serverfin; + if (!IS_HTX_STRM(s)) { + if ((scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) && tick_isset(sess->fe->timeout.clientfin)) + scf->ioto = sess->fe->timeout.clientfin; + if ((scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE|SC_FL_SHUT_DONE)) && tick_isset(s->be->timeout.serverfin)) + scb->ioto = s->be->timeout.serverfin; + } } }