fix wss error on shutdown
this is triggered by e2e tests
This commit is contained in:
parent
3ecfb02aaf
commit
0e985b77d6
1 changed files with 2 additions and 2 deletions
|
|
@ -323,8 +323,8 @@ export class StreamingApiServerService implements OnApplicationShutdown {
|
|||
await new Promise<void>((resolve, reject) => {
|
||||
if (this.#wss) {
|
||||
this.#wss.close(err => {
|
||||
if (err) reject(err);
|
||||
else resolve();
|
||||
// according to the documentation, this callback only receives an error if the server was already closed: we can ignore that
|
||||
resolve();
|
||||
});
|
||||
} else {
|
||||
resolve();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue