formatting

This commit is contained in:
2026-08-10 04:02:41 +00:00
parent 6f6bddf560
commit 04e61b7208
2 changed files with 8 additions and 9 deletions
+4 -3
View File
@@ -267,17 +267,18 @@ export class ExponentialBackoff {
// Wait for the delay or the abort signal
await new Promise((resolve, reject) => {
// Set a timeout to resolve the promise after the delay
// eslint-disable-next-line prefer-const
let timeout: ReturnType<typeof setTimeout>;
// Handle the abort signal
const abortHandler = () => {
const abortHandler = (): void => {
clearTimeout(timeout);
abortController.signal.removeEventListener('abort', abortHandler);
reject(new ExponentialBackoffStoppedRetriesError(abortController.signal.reason));
};
// Handle the timeout
const timeoutHandler = () => {
const timeoutHandler = (): void => {
abortController.signal.removeEventListener('abort', abortHandler);
resolve(undefined);
};
@@ -287,7 +288,7 @@ export class ExponentialBackoff {
// Add the abort handler to the abort signal
abortController.signal.addEventListener('abort', abortHandler);
})
});
attempt++;
}