Update to print info on exit term signals handled

This commit is contained in:
Wu Cheng-Han 2017-03-22 15:31:39 +08:00
parent 0bcd83576f
commit e751684aa3

1
app.js
View file

@ -648,6 +648,7 @@ process.on('uncaughtException', function (err) {
// install exit handler // install exit handler
function handleTermSignals () { function handleTermSignals () {
logger.info('hackmd has been killed by signal, try to exit gracefully...')
config.maintenance = true config.maintenance = true
// disconnect all socket.io clients // disconnect all socket.io clients
Object.keys(io.sockets.sockets).forEach(function (key) { Object.keys(io.sockets.sockets).forEach(function (key) {