]> zoso.dev Git - nano-pow.git/commitdiff
Revert setTimeout workaround now that initialization has been improved.
authorChris Duncan <chris@zoso.dev>
Sun, 23 Mar 2025 07:02:16 +0000 (00:02 -0700)
committerChris Duncan <chris@zoso.dev>
Sun, 23 Mar 2025 07:02:16 +0000 (00:02 -0700)
src/bin/cli.ts
src/bin/server.ts

index 81389f3b6068491d66f4cd8cd9b358ed7fbaa0a8..9d0f518a117a8e09295fb988db659c8269a8eac2 100755 (executable)
@@ -111,7 +111,6 @@ if (hashes.length === 0) {
        const dir = path.slice(0, path.lastIndexOf('/'))
        await fs.writeFile(`${dir}/cli.html`, '')
        await page.goto(import.meta.resolve('./cli.html'))
-       await new Promise(resolve => { setTimeout(resolve) })
        await page.waitForFunction(async (): Promise<GPUAdapter | null> => {
                return await navigator.gpu.requestAdapter()
        })
index da583701ca0338b10744d87193780079b85d418c..834617f290743d3f3990abb5cd48f1ab6899b1d8 100755 (executable)
@@ -110,7 +110,6 @@ async function work_validate (res: http.ServerResponse, json: WorkValidateReques
        const dir = path.slice(0, path.lastIndexOf('/'))
        await fs.writeFile(`${dir}/server.html`, '')
        await page.goto(import.meta.resolve('./server.html'))
-       await new Promise(resolve => { setTimeout(resolve) })
        await page.waitForFunction(async (): Promise<GPUAdapter | null> => {
                return await navigator.gpu.requestAdapter()
        })