fix wss error on shutdown

this is triggered by e2e tests
This commit is contained in:
dakkar 2025-09-19 13:03:08 +01:00
parent 3ecfb02aaf
commit 0e985b77d6

View file

@ -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();