Prevent duplicate bus shutdowns on container destroy; bump version

This commit is contained in:
Garrett Mills 2022-03-30 23:40:10 -05:00
parent 351a2e14b8
commit 445f16d973
3 changed files with 7 additions and 3 deletions

View File

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

View File

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

View File

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