mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 08:43:49 +02:00
Fix nested worker randomly shutting off in Firefox (closes #435)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user