don't detach error handler until *after* socket close
This commit is contained in:
parent
49eb26694a
commit
d18b910791
1 changed files with 1 additions and 1 deletions
|
|
@ -311,10 +311,10 @@ export class StreamingApiServerService implements OnApplicationShutdown {
|
|||
|
||||
this.#connections.clear();
|
||||
this.#connectionsByClient.clear();
|
||||
this.#wss.off('error', this.onWsError);
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
this.#wss.close(err => {
|
||||
this.#wss.off('error', this.onWsError);
|
||||
if (err) reject(err);
|
||||
else resolve();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue