()
| 327 | * This exits the running process properly. |
| 328 | */ |
| 329 | cleanUp() { |
| 330 | logger.info('server shutting down'); |
| 331 | // Stop token refill job if running |
| 332 | if (this.config.rateLimiting?.enabled) { |
| 333 | stopRefillJob(logger); |
| 334 | } |
| 335 | Promise.all(this.servers.map(server => |
| 336 | new Promise(resolve => server.close(resolve)) |
| 337 | )).then(() => process.exit(0)); |
| 338 | } |
| 339 | |
| 340 | caughtExceptionShutdown() { |
| 341 | if (!this.cluster) { |
nothing calls this directly
no test coverage detected