X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Ffixed.ts;h=1fea176c4f3884c1ce4778f891d059d9f48bbbde;hb=5ff840c7da44b209f1bab00f0881f7fc93e36eec;hp=3b45dc17e005f9495ea73a05c6abef478fccb2de;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/src/pools/cluster/fixed.ts b/src/pools/cluster/fixed.ts index 3b45dc17..1fea176c 100644 --- a/src/pools/cluster/fixed.ts +++ b/src/pools/cluster/fixed.ts @@ -52,10 +52,10 @@ export class FixedClusterPool< workerNodeKey: number, message: MessageValue ): void { - this.workerNodes[workerNodeKey].worker.send({ + this.workerNodes[workerNodeKey]?.worker.send({ ...message, - workerId: this.getWorkerInfo(workerNodeKey).id as number - }) + workerId: this.getWorkerInfo(workerNodeKey)?.id + } satisfies MessageValue) } /** @inheritDoc */