X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fabstract-pool.ts;h=122e9fa5c9dbbad12f7eaf01b1db4f0b38ab35e4;hb=1d71a90829622a3541c2530c90b208e9e72ba9ec;hp=3cb6c1f7a7b034086e6e20a56635c44f1d8af0f2;hpb=ed6dd37f9e137cf659523d9d792f0171eedcb8ed;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 3cb6c1f7..122e9fa5 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -105,7 +105,7 @@ export abstract class AbstractPool< this.getWorkerRunningTasks(workerCreated) === 0 ) { // Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime) - void (this.destroyWorker(workerCreated) as Promise) + void this.destroyWorker(workerCreated) } }) return workerCreated @@ -208,7 +208,8 @@ export abstract class AbstractPool< const res = this.internalExecute(worker, this.nextMessageId) this.checkAndEmitBusy() this.sendToWorker(worker, { - data, + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + data: data ?? ({} as Data), id: this.nextMessageId }) ++this.nextMessageId