]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if we don't retry, use MRD instead of IRT for timeout
authorAlan T. DeKok <aland@freeradius.org>
Sun, 3 Mar 2024 15:34:14 +0000 (10:34 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 4 Mar 2024 02:12:24 +0000 (21:12 -0500)
which gies a better value for the timeout, as MRD is the only
one which matters.

src/lib/util/retry.c

index 567d733d6d4afd7897612e134b3fc963936829ef..72fa4caf503538fa8bc4cde559ab5ec734b7bd4f 100644 (file)
@@ -46,6 +46,14 @@ void fr_retry_init(fr_retry_t *r, fr_time_t now, fr_retry_config_t const *config
        r->start = now;
        r->updated = now;
 
+       /*
+        *      Only 1 retry, the timeout is MRD, not IRT.
+        */
+       if (config->mrc == 1) {
+               r->next = fr_time_add(now, config->mrd);
+               return;
+       }
+
        /*
         *      Initial:
         *