refactor: merge worker error handlers into one
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 10 Jun 2023 23:41:07 +0000 (01:41 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 10 Jun 2023 23:41:07 +0000 (01:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts

index f64e9ea41cd6ee3779e75e92cd158d963bd56a7b..db7c83ee2fed1ec558b6ee9eee5b7b8202368085 100644 (file)
@@ -687,8 +687,6 @@ export abstract class AbstractPool<
       if (this.emitter != null) {
         this.emitter.emit(PoolEvents.error, error)
       }
-    })
-    worker.on('error', () => {
       if (this.opts.restartWorkerOnError === true) {
         this.createAndSetupWorker()
       }