]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
MRC of 1 is really MRD
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Oct 2024 20:23:39 +0000 (16:23 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Oct 2024 20:40:41 +0000 (16:40 -0400)
i.e. a simple duration, and not a repeated count

src/lib/util/retry.c

index 13f2a7c9b52694e0ddff88e53e293777c71746e8..45d70d64b5b2bc1577ac658f5b55e969cb131a59 100644 (file)
@@ -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;
        }