Skip to content

Commit d2b620f

Browse files
committed
Make shortPoll() more permissive
This will make us less likely to crash if the user's computer is being slow for whatever reason.
1 parent bef9baf commit d2b620f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export async function nextTick(): Promise<void> {
251251
*
252252
* If the function does not return a value within a reasonable amount of time,
253253
* throws {@link TimedOutError}. */
254-
export async function shortPoll<T>(fn: () => T, ms: number = 10): Promise<T> {
254+
export async function shortPoll<T>(fn: () => T, ms: number = 100): Promise<T> {
255255
// Relies on the implicit behavior of setTimeout() being automatically
256256
// delayed--see "Nested timeouts" from:
257257
// https://developer.mozilla.org/en-US/docs/Web/API/setTimeout

0 commit comments

Comments
 (0)