Prevent duplicate bus shutdowns on container destroy; bump version

orm-types
Garrett Mills 2 years ago
parent 351a2e14b8
commit 445f16d973

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.9.18", "version": "0.9.19",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

@ -234,6 +234,8 @@ export class Bus<TEvent extends Event = Event> extends Unit implements EventBus<
} }
onContainerDestroy(): Awaitable<void> { onContainerDestroy(): Awaitable<void> {
this.down() if ( this.isUp ) {
this.down()
}
} }
} }

@ -139,6 +139,8 @@ export class LocalBus<TEvent extends Event = Event> extends CanonicalItemClass i
} }
onContainerRelease(): Awaitable<void> { onContainerRelease(): Awaitable<void> {
this.down() if ( this.isUp ) {
this.down()
}
} }
} }

Loading…
Cancel
Save