diff --git a/src/worker-pool.ts b/src/worker-pool.ts index 54c1f6e..3f97dde 100644 --- a/src/worker-pool.ts +++ b/src/worker-pool.ts @@ -203,7 +203,7 @@ class WorkerPool { } async teardown(): Promise { - if (NODE_VERSION_MAJOR >= 12 && NODE_VERSION_MINOR >= 5) { + if (NODE_VERSION_MAJOR > 12 || (NODE_VERSION_MAJOR >= 12 && NODE_VERSION_MINOR >= 5)) { const terminationPromises = [] for (const { worker } of this.workers) {