From 5e8ae971f1eb769b5c48eddc39cfd72bdacad57f Mon Sep 17 00:00:00 2001 From: strawberry Date: Mon, 22 Apr 2024 20:24:29 -0400 Subject: [PATCH] flip min_duration and max_duration Signed-off-by: strawberry --- src/service/sending/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/sending/mod.rs b/src/service/sending/mod.rs index 43f3959d..4128e3c7 100644 --- a/src/service/sending/mod.rs +++ b/src/service/sending/mod.rs @@ -409,8 +409,8 @@ impl Service { .and_modify(|e| match e { TransactionStatus::Failed(tries, time) => { // Fail if a request has failed recently (exponential backoff) - let min_duration = Duration::from_secs(services().globals.config.sender_retry_backoff_limit); - let max_duration = Duration::from_secs(services().globals.config.sender_timeout); + let min_duration = Duration::from_secs(services().globals.config.sender_timeout); + let max_duration = Duration::from_secs(services().globals.config.sender_retry_backoff_limit); let min_elapsed_duration = min_duration * (*tries) * (*tries); let min_elapsed_duration = cmp::min(min_elapsed_duration, max_duration); if time.elapsed() < min_elapsed_duration {