fix: cleanup web worker when worker client gets disposed (#253967)

* fix: cleanup web worker when worker client gets disposed

* simplify

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
This commit is contained in:
Robo
2025-07-04 03:13:55 +09:00
committed by GitHub
parent f794941584
commit 7e17b1a77c

View File

@@ -315,7 +315,7 @@ export class WebWorkerClient<W extends object> extends Disposable implements IWe
) {
super();
this._worker = worker;
this._worker = this._register(worker);
this._register(this._worker.onMessage((msg) => {
this._protocol.handleMessage(msg);
}));