Fix async context loss in WebSocketBus
This commit is contained in:
parent
085fe04f90
commit
9b47d2ac99
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@extollo/lib",
|
"name": "@extollo/lib",
|
||||||
"version": "0.13.8",
|
"version": "0.13.9",
|
||||||
"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",
|
||||||
|
@ -154,8 +154,10 @@ export class WebSocketBus implements EventBus, AwareOfContainerLifecycle {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.ws.on('close', () => this.bus.push(new WebSocketCloseEvent()))
|
this.ws.on('close', () =>
|
||||||
this.ws.on('error', () => this.bus.push(new WebSocketCloseEvent()))
|
resource.runInAsyncScope(() => this.bus.push(new WebSocketCloseEvent())))
|
||||||
|
this.ws.on('error', () =>
|
||||||
|
resource.runInAsyncScope(() => this.bus.push(new WebSocketCloseEvent())))
|
||||||
|
|
||||||
await this.registerHealthCheck()
|
await this.registerHealthCheck()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user