Skip to content

Commit 1832eef

Browse files
committed
fix(desktop): remove unnecessary setTimeout
1 parent e6d8315 commit 1832eef

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/desktop/src/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,7 @@ type ServerReadyData = { url: string; password: string | null }
391391

392392
// Gate component that waits for the server to be ready
393393
function ServerGate(props: { children: (data: Accessor<ServerReadyData>) => JSX.Element }) {
394-
const [serverData] = createResource<ServerReadyData>(() =>
395-
commands.ensureServerReady().then((v) => {
396-
return new Promise((res) => setTimeout(() => res(v as ServerReadyData), 2000))
397-
}),
398-
)
394+
const [serverData] = createResource(() => commands.ensureServerReady())
399395

400396
const errorMessage = () => {
401397
const error = serverData.error

0 commit comments

Comments
 (0)