X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerSet.ts;h=1da58e9ec0c81d78cde805217c293d529ecc584c;hb=192927e0a96e35e9d302b3ce845a2db99f19e9df;hp=73014977070673616607821928e86ad0bd88af0d;hpb=c1cee6029e88a827b830dca95ad2125d05a7a13c;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 73014977..1da58e9e 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -1,9 +1,9 @@ // Partial Copyright Jerome Benoit. 2021. All Rights Reserved. -import { WorkerData, WorkerMessageEvents, WorkerOptions, WorkerSetElement } from '../types/Worker'; +import { Worker } from 'worker_threads'; +import { WorkerData, WorkerMessageEvents, WorkerOptions, WorkerSetElement } from '../types/Worker'; import Utils from '../utils/Utils'; -import { Worker } from 'worker_threads'; import WorkerAbstract from './WorkerAbstract'; import { WorkerUtils } from './WorkerUtils'; @@ -96,9 +96,7 @@ export default class WorkerSet extends WorkerAbstract { /* This is intentional */ }); }); - worker.on('error', () => { - /* This is intentional */ - }); + worker.on('error', WorkerUtils.defaultErrorHandler); worker.on('exit', (code) => { WorkerUtils.defaultExitHandler(code); this.workerSet.delete(this.getWorkerSetElementByWorker(worker));