From: Aurelien DARRAGON Date: Mon, 28 Sep 2026 13:39:58 +0000 (+0200) Subject: Revert "CLEANUP: proxy: mention that px->conn_retries isn't relevant in some cases" X-Git-Tag: v3.5-dev8~102 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=e23cb222bda2ab5162538e7939477741630b7f24;p=haproxy.git Revert "CLEANUP: proxy: mention that px->conn_retries isn't relevant in some cases" This reverts commit bd48e26a747016acfddce2929443f84fdb9e6997. Indeed, since commit b71d27e253 ("BUG/MINOR: stream: Fix custom max-retries initialization when setting backend"), the proxy conn_retries parameter is now taken again into account for proxies lacking the CAP_FE capability. Let's remove comments that says otherwise. --- diff --git a/src/peers.c b/src/peers.c index 4dabda336..4c89cad7b 100644 --- a/src/peers.c +++ b/src/peers.c @@ -3432,12 +3432,7 @@ void peers_setup_frontend(struct proxy *fe) { fe->mode = PR_MODE_PEERS; fe->maxconn = 0; - fe->conn_retries = CONN_RETRIES; /* FIXME ignored since 91e785ed - * ("MINOR: stream: Rely on a per-stream max connection retries value") - * If this is really expected this should be set on the stream directly - * because the proxy is not part of the main proxy list and thus - * lacks the required post init for this setting to be considered - */ + fe->conn_retries = CONN_RETRIES; fe->timeout.connect = MS_TO_TICKS(1000); fe->timeout.client = MS_TO_TICKS(5000); fe->timeout.server = MS_TO_TICKS(5000); diff --git a/src/resolvers.c b/src/resolvers.c index 1bb98ec3a..24f9915f5 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -3540,12 +3540,7 @@ int check_action_do_resolve(struct act_rule *rule, struct proxy *px, char **err) void resolvers_setup_proxy(struct proxy *px) { px->maxconn = 0; - px->conn_retries = 1; /* FIXME ignored since 91e785ed - * ("MINOR: stream: Rely on a per-stream max connection retries value") - * If this is really expected this should be set on the stream directly - * because the proxy is not part of the main proxy list and thus - * lacks the required post init for this setting to be considered - */ + px->conn_retries = 1; px->timeout.server = TICK_ETERNITY; px->timeout.client = TICK_ETERNITY; px->timeout.connect = 1000; // by default same than timeout.resolve diff --git a/src/sink.c b/src/sink.c index e3a69703b..887f4e047 100644 --- a/src/sink.c +++ b/src/sink.c @@ -420,11 +420,7 @@ void sink_setup_proxy(struct proxy *px) { px->mode = PR_MODE_SYSLOG; px->maxconn = 0; - px->conn_retries = 1; /* FIXME ignored since 91e785ed - * ("MINOR: stream: Rely on a per-stream max connection retries value") - * If this is really expected this should be set on the stream directly - * because the proxy lacks the CAP_FE so this setting is not considered - */ + px->conn_retries = 1; px->timeout.server = TICK_ETERNITY; px->timeout.client = TICK_ETERNITY; px->timeout.connect = TICK_ETERNITY;