From: Alan T. DeKok Date: Thu, 24 Oct 2024 20:23:39 +0000 (-0400) Subject: MRC of 1 is really MRD X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=339e545a01ad0652f1070ca30aa2f45fcfa50ae5;p=thirdparty%2Ffreeradius-server.git MRC of 1 is really MRD i.e. a simple duration, and not a repeated count --- diff --git a/src/lib/util/retry.c b/src/lib/util/retry.c index 13f2a7c9b52..45d70d64b5b 100644 --- a/src/lib/util/retry.c +++ b/src/lib/util/retry.c @@ -121,6 +121,14 @@ fr_retry_state_t fr_retry_next(fr_retry_t *r, fr_time_t now) * We retried too many times. Fail. */ if (r->config->mrc && (r->count > r->config->mrc)) { + /* + * A count of 1 is really a simple duration. + */ + if (r->config->mrc == 1) { + r->state = FR_RETRY_MRD; + return FR_RETRY_MRD; + } + r->state = FR_RETRY_MRC; return FR_RETRY_MRC; }