pull/7076/head
baseballyama 5 years ago
parent c1220a18d5
commit ebf5ff84f8

@ -287,7 +287,7 @@ export async function retryAsync<T>(fn: () => Promise<T>, maxAttempts: number =
return await fn(); return await fn();
} catch (err) { } catch (err) {
if (++attempts >= maxAttempts) throw err; if (++attempts >= maxAttempts) throw err;
new Promise(resolve => setTimeout(resolve, interval)); await new Promise(resolve => setTimeout(resolve, interval));
} }
} }
} }

Loading…
Cancel
Save