WASM: defer next datagram read via setTimeout to yield to Go scheduler

This commit is contained in:
realrasengan
2026-03-30 16:42:33 -07:00
parent 37159d31bd
commit 83b9ce0de5
+2 -2
View File
@@ -96,8 +96,8 @@ func (c *wtConn) startReader() {
case c.incoming <- buf:
default:
}
// Chain next read.
readNext.Invoke()
// Defer next read to next event loop tick so Go goroutines can process.
js.Global().Call("setTimeout", readNext, 0)
return nil
})