jcayzac
jcayzac17mo ago

How to recover from worker death? It terminates my main program…

In the error message handler, I replace the dead worker with a new one, but it kills my program either way. Full repro & log at https://gist.github.com/jcayzac/48ae8304a6b3c790353c52f98e242904 Thanks!
Gist
Deno worker death
Deno worker death. GitHub Gist: instantly share code, notes, and snippets.
2 Replies
AapoAlas
AapoAlas17mo ago
woker.addEventListener("error", () => null) Oh, you do have an error listener. Possibly ev.preventDefault()?
jcayzac
jcayzacOP17mo ago
@aapoalas thanks, preventDefault() worked!