]> git.kaiwu.me - haproxy.git/commitdiff
Revert "CLEANUP: proxy: mention that px->conn_retries isn't relevant in some cases"
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 28 Sep 2026 13:39:58 +0000 (15:39 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 28 Sep 2026 13:39:58 +0000 (15:39 +0200)
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.

src/peers.c
src/resolvers.c
src/sink.c

index 4dabda33626167d44caeb97cf977ab78014b7a5e..4c89cad7bd4fd3e19c22710747b2e585a7c4a114 100644 (file)
@@ -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);
index 1bb98ec3a030ee7b579bcb57f7f9d9ab70f85f5d..24f9915f5c0abd905ee4def7e7841bd222483af3 100644 (file)
@@ -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
index e3a69703b12d561ead331bcfeeff774d63377c7b..887f4e047d25d3c16da472134aebb14da5771479 100644 (file)
@@ -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;