We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc8e75a commit bb04294Copy full SHA for bb04294
tests/canary/canary.js
@@ -76,7 +76,7 @@ async function retry(fn, attempts = 3) {
76
try {
77
return await fn();
78
} catch (error) {
79
- if (i === attempts) throw error;
+ if (i === attempts-1) throw error;
80
console.log(`Retry ${i + 1}/${attempts} failed, retrying...`);
81
await new Promise((resolve) => setTimeout(resolve, 2000));
82
}
0 commit comments