shutdown gracefully when sigint is recieved

This commit is contained in:
Emily 2021-03-02 09:18:00 +11:00
parent 2f5f066588
commit 208f2c2d01

View file

@ -146,3 +146,8 @@ process.on('uncaughtException', (error) => {
process.on('unhandledRejection', err => {
client.logger.error('UNHANDLED_PROMISE_ERROR', err.stack);
});
// Shut down gracefully when SIGINT is recieved
process.on('SIGINT', () => {
client.functions.shutdown();
});