From: Amaury Denoyelle Date: Thu, 10 Apr 2025 16:05:55 +0000 (+0200) Subject: BUG/MINOR: rhttp: fix reconnect if timeout connect unset X-Git-Tag: v3.2-dev11~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b8da5f9ab8639f4213ee21fc5fd5ca12c53cddb;p=thirdparty%2Fhaproxy.git BUG/MINOR: rhttp: fix reconnect if timeout connect unset Active connect on reverse http relies on connect timeout to detect connection failure. Thus, if this timeout was unset, connection failure may not be properly detected. Fix this by fallback on hardcoded value of 1s for connect if timeout is unset in the configuration. This is considered as a minor bug, as haproxy advises against running with timeout unset. This must be backported up to 2.9. --- diff --git a/src/proto_rhttp.c b/src/proto_rhttp.c index b81589936..c858febcf 100644 --- a/src/proto_rhttp.c +++ b/src/proto_rhttp.c @@ -288,7 +288,7 @@ struct task *rhttp_process(struct task *task, void *ctx, unsigned int state) l->rx.rhttp.pend_conn = conn; /* On success task will be woken up by H2 mux after reversal. */ - l->rx.rhttp.task->expire = conn ? + l->rx.rhttp.task->expire = conn && tick_isset(srv->proxy->timeout.connect) ? tick_add_ifset(now_ms, srv->proxy->timeout.connect) : MS_TO_TICKS(now_ms + 1000); }