Skip to content

Commit

Permalink
Make shortPoll() more permissive
Browse files Browse the repository at this point in the history
This will make us less likely to crash if the user's computer is being
slow for whatever reason.
  • Loading branch information
josh-berry committed Nov 10, 2024
1 parent bef9baf commit d2b620f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export async function nextTick(): Promise<void> {
*
* If the function does not return a value within a reasonable amount of time,
* throws {@link TimedOutError}. */
export async function shortPoll<T>(fn: () => T, ms: number = 10): Promise<T> {
export async function shortPoll<T>(fn: () => T, ms: number = 100): Promise<T> {
// Relies on the implicit behavior of setTimeout() being automatically
// delayed--see "Nested timeouts" from:
// https://developer.mozilla.org/en-US/docs/Web/API/setTimeout
Expand Down

0 comments on commit d2b620f

Please sign in to comment.