Skip to content

Commit

Permalink
docs: exponential backoff formula in comment (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardharrington authored Aug 14, 2021
1 parent 7baad4b commit b51b6a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b51b6a1

Please sign in to comment.