()
| 4024 | }); |
| 4025 | let shuttingDown = false; |
| 4026 | const shutdown = async () => { |
| 4027 | if (shuttingDown) return; |
| 4028 | shuttingDown = true; |
| 4029 | // Stop accepting new connections before tearing down sessions. |
| 4030 | server.stop(true); |
| 4031 | await sessionManager.destroyAll(); |
| 4032 | await removeServerLock(); |
| 4033 | process.exit(0); |
| 4034 | }; |
| 4035 | process.once('SIGINT', () => void shutdown()); |
| 4036 | process.once('SIGTERM', () => void shutdown()); |
| 4037 | }); |
no test coverage detected