Fix nested worker randomly shutting off in Firefox (closes #435)

This commit is contained in:
Vanilagy
2026-07-18 14:44:57 +02:00
parent bfbd90e1d8
commit 0554696505
5 changed files with 17 additions and 0 deletions
+1
View File
@@ -46,6 +46,7 @@ export const unrefWorker = async () => {
if (worker) {
if (worker.unref) {
worker.unref(); // If we don't do this, then the Node process never terminates by itself
// Keep the worker around tho
} else if (typeof window === 'undefined') {
// Non-browser environment without unref - terminate instead
worker.terminate();