From: William Lallemand Date: Wed, 16 Apr 2025 12:16:02 +0000 (+0200) Subject: BUG/MINOR: acme: fix the exponential backoff of retries X-Git-Tag: v3.2-dev11~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=608eb3d090225a19621701b06b07c51a253202c1;p=thirdparty%2Fhaproxy.git BUG/MINOR: acme: fix the exponential backoff of retries Exponential backoff values was multiplied by 3000 instead of 3 with a second to ms conversion. Leading to a 9000000ms value at the 2nd attempt. Fix the issue by setting the value in seconds and converting the value in tick_add(). No backport needed. --- diff --git a/src/acme.c b/src/acme.c index 895a3ebd0..ec780139a 100644 --- a/src/acme.c +++ b/src/acme.c @@ -1679,9 +1679,9 @@ retry: int i; for (i = 0; i < ACME_RETRY - ctx->retries; i++) - delay *= 3000; - ha_notice("acme: %s, retrying in %dms (%d/%d)...\n", errmsg ? errmsg : "", delay, ACME_RETRY-ctx->retries, ACME_RETRY); - task->expire = tick_add(now_ms, delay); + delay *= 3; + ha_notice("acme: %s, retrying in %ds (%d/%d)...\n", errmsg ? errmsg : "", delay, ACME_RETRY - ctx->retries, ACME_RETRY); + task->expire = tick_add(now_ms, delay * 1000); } else { ha_notice("acme: %s, aborting. (%d/%d)\n", errmsg ? errmsg : "", ACME_RETRY-ctx->retries, ACME_RETRY);