From: Jérôme Benoit Date: Mon, 15 Feb 2021 16:36:51 +0000 (+0100) Subject: Remove matching worker set element when a worker exit. X-Git-Tag: v1.0.1-0~104^2~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d7a48614f989c8f32255a492b09fc0abcf6eca26;p=e-mobility-charging-stations-simulator.git Remove matching worker set element when a worker exit. Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index c550149b..6ea0a059 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -79,7 +79,7 @@ export default class WorkerSet extends Wrk { if (code !== 0) { console.error(`Worker stopped with exit code ${code}`); } - // FIXME: remove matching worker set element + this.workerSet.delete(this.getWorkerSetElementByWorker(worker)); }); this.workerSet.add({ worker, numberOfWorkerElements: 0 }); }