build(deps-dev): bump rollup
[poolifier.git] / src / worker / abstract-worker.ts
index 311a56ad60e00684835e89ef0507d60f0c9d4432..e10521fcbc7808eeffeb778aa8dfb13ce0eb680e 100644 (file)
@@ -100,6 +100,7 @@ export abstract class AbstractWorker<
     this.checkTaskFunctions(taskFunctions)
     this.checkWorkerOptions(this.opts)
     if (!this.isMain) {
+      // Should be once() but Node.js on windows has a bug that prevents it from working
       this.getMainWorker().on('message', this.handleReadyMessage.bind(this))
     }
   }
@@ -367,13 +368,13 @@ export abstract class AbstractWorker<
    *
    * @param message - The kill message.
    */
-  protected handleKillMessage (message: MessageValue<Data>): void {
+  protected handleKillMessage (_message: MessageValue<Data>): void {
     this.stopCheckActive()
     if (isAsyncFunction(this.opts.killHandler)) {
       (this.opts.killHandler?.() as Promise<void>)
         .then(() => {
           this.sendToMainWorker({ kill: 'success' })
-          return null
+          return undefined
         })
         .catch(() => {
           this.sendToMainWorker({ kill: 'failure' })