fix: workaround possible race condition at work nodes array element removal and querying
[poolifier.git] / src / pools / cluster / fixed.ts
index d457b37790d0537c80e17635fcbb76c4b4599b6d..68ae50050ba24d38ac1cd2b6119af626d248e9c6 100644 (file)
@@ -85,7 +85,7 @@ export class FixedClusterPool<
   ): void {
     this.workerNodes[workerNodeKey].worker.send({
       ...message,
-      workerId: this.workerNodes[workerNodeKey].info.id as number
+      workerId: this.getWorkerInfo(workerNodeKey).id as number
     })
   }