Skip to content

Commit a8ddaf3

Browse files
feedback
1 parent 8979c96 commit a8ddaf3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/backend/src/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,11 @@ export const setIntervalAsync = (target: () => Promise<void>, pollingIntervalMs:
279279
if ((target as any).isRunning) return;
280280

281281
(target as any).isRunning = true;
282-
await target(...args);
283-
(target as any).isRunning = false;
282+
try {
283+
await target(...args);
284+
} finally {
285+
(target as any).isRunning = false;
286+
}
284287
};
285288
}
286289

0 commit comments

Comments
 (0)