From 71e72e27e5a940e6596c6be5cb77c222a66794c5 Mon Sep 17 00:00:00 2001 From: jsakamoto Date: Sat, 10 Feb 2024 11:39:31 +0900 Subject: [PATCH] Fix: timeout error has happened so often. --- BlazingStory/Internals/Components/Preview/PreviewFrame.razor.js | 2 +- BlazingStory/Internals/Components/Preview/PreviewFrame.razor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.js b/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.js index 35c15d22..958dee59 100644 --- a/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.js +++ b/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.js @@ -9,7 +9,7 @@ const waitFor = async (arg) => { const result = arg.predecate(); if (result !== false) return result; - if (retryCount >= ((_a = arg.maxRetryCount) !== null && _a !== void 0 ? _a : 50)) + if (retryCount >= ((_a = arg.maxRetryCount) !== null && _a !== void 0 ? _a : 500)) throw new TimeoutError("Timeout"); retryCount++; await delay((_b = arg.retryInterval) !== null && _b !== void 0 ? _b : 10); diff --git a/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.ts b/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.ts index a23dc890..39f04815 100644 --- a/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.ts +++ b/BlazingStory/Internals/Components/Preview/PreviewFrame.razor.ts @@ -10,7 +10,7 @@ const waitFor = async (arg: { predecate: () => false | T, maxRetryCount?: num while (true) { const result = arg.predecate(); if (result !== false) return result as T; - if (retryCount >= (arg.maxRetryCount ?? 50)) throw new TimeoutError("Timeout"); + if (retryCount >= (arg.maxRetryCount ?? 500)) throw new TimeoutError("Timeout"); retryCount++; await delay(arg.retryInterval ?? 10); }