From 40bbc0e1c272ecd653ede82601923a9491d2e1a6 Mon Sep 17 00:00:00 2001 From: rokatyy Date: Mon, 13 Jan 2025 16:02:52 +0000 Subject: [PATCH] Wait forever for fatal errors --- pkg/common/helper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/helper.go b/pkg/common/helper.go index 7c84f06..cefd327 100644 --- a/pkg/common/helper.go +++ b/pkg/common/helper.go @@ -50,10 +50,10 @@ func RetryFunc(ctx context.Context, var attempt = 0 for attempt <= attempts { - attempt += 1 + attempt++ // some errors might require more attempts than expected, so allow incrementing attempts from outside retry, err, addAttempts = fn(attempt) - attempt += addAttempts + attempts += addAttempts // if there's no need to retry - we're done if !retry {