Clean worker from pool after it was destroyed (#146)
[poolifier.git] / src / pools / thread / dynamic.ts
index c10333158002bdb7ec16d3aec688746d42e3273f..9ab6bf30a7764ff3d18abd5ca99d1896cd055842 100644 (file)
@@ -68,7 +68,6 @@ export class DynamicThreadPool<
         if (message.kill) {
           this.sendToWorker(worker, { kill: 1 })
           void this.destroyWorker(worker)
-          this.removeWorker(worker)
         }
       })
       return worker