From d2b620f4839aa62f3b199168ba4ab7b141c1b597 Mon Sep 17 00:00:00 2001 From: "Joshua J. Berry" Date: Sat, 9 Nov 2024 20:26:43 -0500 Subject: [PATCH] Make shortPoll() more permissive This will make us less likely to crash if the user's computer is being slow for whatever reason. --- src/util/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/index.ts b/src/util/index.ts index 1d7cea6..adaedd7 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -251,7 +251,7 @@ export async function nextTick(): Promise { * * If the function does not return a value within a reasonable amount of time, * throws {@link TimedOutError}. */ -export async function shortPoll(fn: () => T, ms: number = 10): Promise { +export async function shortPoll(fn: () => T, ms: number = 100): Promise { // Relies on the implicit behavior of setTimeout() being automatically // delayed--see "Nested timeouts" from: // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout