From d70e479c9242af68dceb736ebf22b73a2dfdadc1 Mon Sep 17 00:00:00 2001 From: Geoffrey Mureithi <95377562+geofmureithi@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:57:46 +0300 Subject: [PATCH] fix: die if retries is zero (#365) --- src/layers/retry/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layers/retry/mod.rs b/src/layers/retry/mod.rs index 982fabad..53db3df3 100644 --- a/src/layers/retry/mod.rs +++ b/src/layers/retry/mod.rs @@ -46,6 +46,7 @@ where None } Err(_) if (self.retries - ctx.current() > 0) => Some(future::ready(self.clone())), + Err(_) if self.retries == 0 => None, Err(_) => None, } }