Merge branch 'master' of github.com:poolifier/poolifier into feature/task-functions
[poolifier.git] / src / worker / cluster-worker.ts
index 35899e794f5b373aa5bca3ec5b3dbe2d1f5cd4c3..1f9895d6e37b25a73911cd84f1c1f6f7404a98b8 100644 (file)
@@ -45,16 +45,16 @@ export class ClusterWorker<
   protected handleReadyMessage (message: MessageValue<Data>): void {
     if (message.workerId === this.id && message.ready === false) {
       try {
-        this.getMainWorker()?.on('message', this.messageListener.bind(this))
+        this.getMainWorker().on('message', this.messageListener.bind(this))
         this.sendToMainWorker({
           ready: true,
-          taskFunctions: this.listTaskFunctions(),
+          taskFunctionNames: this.listTaskFunctionNames(),
           workerId: this.id
         })
       } catch {
         this.sendToMainWorker({
           ready: false,
-          taskFunctions: this.listTaskFunctions(),
+          taskFunctionNames: this.listTaskFunctionNames(),
           workerId: this.id
         })
       }