actions fail invest: log SerrverService.dispose

This commit is contained in:
tamaina 2025-07-21 00:43:31 +09:00
parent de97a3e04b
commit 6aad9299dc
2 changed files with 5 additions and 0 deletions

View File

@ -305,8 +305,11 @@ export class ServerService implements OnApplicationShutdown {
@bindThis
public async dispose(): Promise<void> {
console.log('Disposing ServerService...');
await this.streamingApiServerService.detach();
this.logger.info('Streaming API server detached.');
await this.#fastify.close();
this.logger.info('Fastify server closed.');
}
/**

View File

@ -174,9 +174,11 @@ export class StreamingApiServerService {
if (this.#cleanConnectionsIntervalId) {
clearInterval(this.#cleanConnectionsIntervalId);
this.#cleanConnectionsIntervalId = null;
console.log('Clean connections interval cleared.');
}
return new Promise((resolve) => {
this.#wss.close(() => resolve());
console.log('WebSocket server closed.');
});
}
}