refactor: cleanup worker set message handling code
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 23 Mar 2024 00:10:45 +0000 (01:10 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 23 Mar 2024 00:10:45 +0000 (01:10 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts

index 1e3000cc2f719722fe6ddded93cae1ca4acc3e45..80f502c2f582d795c37211ce027586e73d29aeb7 100644 (file)
@@ -165,7 +165,7 @@ export class WorkerSet<D extends WorkerData, R extends WorkerData> extends Worke
           this.emitter?.emit(WorkerSetEvents.elementError, data)
           reject(data)
         }
-        this.promiseResponseMap.delete(message.uuid)
+        this.promiseResponseMap.delete(uuid)
       }
     })
     worker.on('error', this.workerOptions.poolOptions?.errorHandler ?? EMPTY_FUNCTION)