From f073768188fce66e052bbc15d7a87b601bcf039e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 11 Dec 2023 19:03:46 +0100 Subject: [PATCH] fix: ensure event listeners are removed at worker set stop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/worker/WorkerSet.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index c5df860c..62ddf807 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -95,6 +95,7 @@ export class WorkerSet extends WorkerAbstract { await waitWorkerExit; this.emitter?.emit(WorkerSetEvents.stopped, this.info); this.emitter?.emitDestroy(); + this.emitter?.removeAllListeners(); this.started = false; } } -- 2.34.1