repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd9580e
)
fix: ensure worker graceful shutdown is tried in cluster pool
author
Jérôme Benoit
<jerome.benoit@sap.com>
Wed, 21 Jun 2023 23:28:38 +0000
(
01:28
+0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Wed, 21 Jun 2023 23:28:38 +0000
(
01:28
+0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/cluster/fixed.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/cluster/fixed.ts
b/src/pools/cluster/fixed.ts
index a13a95ceea7aed2a01c98a4f8641408ad2c38741..3f56c858b0ed5b363fc19da06eb1b9a295a66dd5 100644
(file)
--- a/
src/pools/cluster/fixed.ts
+++ b/
src/pools/cluster/fixed.ts
@@
-69,7
+69,10
@@
export class FixedClusterPool<
/** @inheritDoc */
protected destroyWorker (worker: Worker): void {
this.sendToWorker(worker, { kill: 1 })
- worker.kill()
+ worker.on('disconnect', () => {
+ worker.kill()
+ })
+ worker.disconnect()
}
/** @inheritDoc */