handle SIGHUP exit code

This commit is contained in:
Mononaut 2023-11-13 07:33:53 +00:00
parent 28113d1141
commit fa86f97ae8
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -92,7 +92,7 @@ class Server {
logger.notice(`Starting Mempool Server${worker ? ' (worker)' : ''}... (${backendInfo.getShortCommitHash()})`);
// Register cleanup listeners for exit events
['exit', 'SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGUSR2', 'uncaughtException', 'unhandledRejection'].forEach(event => {
['exit', 'SIGHUP', 'SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGUSR2', 'uncaughtException', 'unhandledRejection'].forEach(event => {
process.on(event, () => { this.onExit(event); });
});