Skip to content

Commit

Permalink
Merge pull request #358 from AppQuality/develop
Browse files Browse the repository at this point in the history
feat: Use exponential handling for retry time for paypal
  • Loading branch information
d-beezee authored Oct 23, 2024
2 parents b555c19 + 6787c20 commit 97e37ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/paypal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Paypal {
}
debugMessage(res.data.batch_header);
await new Promise((resolve) =>
setTimeout(resolve, (DEFAULT_RETRIES + 1 - retries) * 500)
setTimeout(resolve, 500 * 2 ** (DEFAULT_RETRIES - retries))
);
return this.waitForCompletion(requestUrl, retries - 1);
} catch (error) {
Expand Down

0 comments on commit 97e37ab

Please sign in to comment.