Merge pull request #1833 from poolifier/combined-prs-branch
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 4 Jan 2024 10:20:33 +0000 (11:20 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Jan 2024 10:20:33 +0000 (11:20 +0100)
Combined PRs

src/pools/abstract-pool.ts

index 65ace6d907a20ca5a88d820d638c1aaa1a6f8bf1..0c366911a1ddb059f3c993f69bfdabfa8404173a 100644 (file)
@@ -1244,7 +1244,8 @@ export abstract class AbstractPool<
       ) {
         this.redistributeQueuedTasks(this.workerNodes.indexOf(workerNode))
       }
-      workerNode.terminate().catch(error => {
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+      workerNode?.terminate().catch(error => {
         this.emitter?.emit(PoolEvents.error, error)
       })
     })