From: Jérôme Benoit Date: Fri, 22 Aug 2025 17:09:57 +0000 (+0200) Subject: fix: ensure destroy event has up2date pool info X-Git-Tag: v5.1.4~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c4138fc3c739c33ad4e1d31cc8e583a97f4ef7aa;p=poolifier.git fix: ensure destroy event has up2date pool info Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index cfd919ccf..10bc2ff52 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -633,15 +633,15 @@ export abstract class AbstractPool< }) ) } finally { + delete this.startTimestamp + this.destroying = false + this.started = false if (this.emitter != null) { this.emitter.listenerCount(PoolEvents.destroy) > 0 && this.emitter.emit(PoolEvents.destroy, this.info) this.emitter.emitDestroy() this.readyEventEmitted = false } - delete this.startTimestamp - this.destroying = false - this.started = false } }