fix(desktop): remove unnecessary setTimeout

pull/11754/head
Brendan Allan 2026-02-02 18:19:49 +08:00
parent e6d8315e29
commit 1832eeffc9
No known key found for this signature in database
GPG Key ID: 41E835AEA046A32E
1 changed files with 1 additions and 5 deletions

View File

@ -391,11 +391,7 @@ type ServerReadyData = { url: string; password: string | null }
// Gate component that waits for the server to be ready // Gate component that waits for the server to be ready
function ServerGate(props: { children: (data: Accessor<ServerReadyData>) => JSX.Element }) { function ServerGate(props: { children: (data: Accessor<ServerReadyData>) => JSX.Element }) {
const [serverData] = createResource<ServerReadyData>(() => const [serverData] = createResource(() => commands.ensureServerReady())
commands.ensureServerReady().then((v) => {
return new Promise((res) => setTimeout(() => res(v as ServerReadyData), 2000))
}),
)
const errorMessage = () => { const errorMessage = () => {
const error = serverData.error const error = serverData.error