From b51b6a1cd8f0c20492ee47f2abdd9fb3f37337a0 Mon Sep 17 00:00:00 2001 From: Richard Harrington Date: Sat, 14 Aug 2021 17:35:13 -0400 Subject: [PATCH] docs: exponential backoff formula in comment (#146) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 852a541..f7974c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -224,7 +224,7 @@ function onError(err: AxiosError) { } } // Else calculate delay according to chosen strategy - // Default to exponential backoff - formula: (2^c - 1 / 2) * 1000 + // Default to exponential backoff - formula: ((2^c - 1) / 2) * 1000 else { if (config.backoffType === 'linear') { delay = config.currentRetryAttempt! * 1000;