From: Alan T. DeKok Date: Sun, 3 Mar 2024 15:34:14 +0000 (-0500) Subject: if we don't retry, use MRD instead of IRT for timeout X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=661b6fbbb1710ca4f0b2284cac7ebfe680296a0a;p=thirdparty%2Ffreeradius-server.git if we don't retry, use MRD instead of IRT for timeout which gies a better value for the timeout, as MRD is the only one which matters. --- diff --git a/src/lib/util/retry.c b/src/lib/util/retry.c index 567d733d6d4..72fa4caf503 100644 --- a/src/lib/util/retry.c +++ b/src/lib/util/retry.c @@ -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: *