commit 45fa3790de466484569e69b6321c20a8fb3d948b
parent 6a4535a7d59929f0260bdd5f4b947d93cc19eab1
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Sun, 2 Jun 2024 09:53:23 +0200
log: enhance logging
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/c2ec/exponential-backoff.go b/c2ec/exponential-backoff.go
@@ -30,6 +30,11 @@ func ShouldStartRetry(
limitMs int,
) bool {
+ if lastExecution.Unix() == 0 {
+ // means no retry was done yet.
+ return true
+ }
+
backoffMs := exponentialBackoffMs(retryCount)
randomizedBackoff := int64(limitMs)
if backoffMs < int64(limitMs) {