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.
This commit is contained in:
William Lallemand 2025-04-16 14:16:02 +02:00
parent 7814a8b446
commit 608eb3d090

View File

@ -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);