fix(desktop): remove unnecessary setTimeout

pull/11734/head
Brendan Allan 2026-02-02 18:19:49 +08:00 committed by Dax Raad
parent 0ccae0cea6
commit f148d38b49
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
function ServerGate(props: { children: (data: Accessor<ServerReadyData>) => JSX.Element }) {
const [serverData] = createResource<ServerReadyData>(() =>
commands.ensureServerReady().then((v) => {
return new Promise((res) => setTimeout(() => res(v as ServerReadyData), 2000))
}),
)
const [serverData] = createResource(() => commands.ensureServerReady())
const errorMessage = () => {
const error = serverData.error