Chore: try to fix worker crash

This commit is contained in:
SukkaW
2023-11-29 21:59:51 +08:00
parent d363c68bee
commit 07b3951d6c

View File

@@ -12,6 +12,7 @@ const handleMessage = async (e: MessageEvent<'build' | 'exit'>) => {
} else if (e.data === 'exit') { } else if (e.data === 'exit') {
self.removeEventListener('message', handleMessage); self.removeEventListener('message', handleMessage);
self.unref(); self.unref();
self.terminate();
} }
}; };