diff --git a/app.js b/app.js index c0c554c4c..9e4d54e74 100644 --- a/app.js +++ b/app.js @@ -506,7 +506,9 @@ process.on('SIGINT', function () { var socket = io.sockets.sockets[key]; // notify client server going into maintenance status socket.emit('maintenance'); - socket.disconnect(true); + setTimeout(function () { + socket.disconnect(true); + }, 0); }); var checkCleanTimer = setInterval(function () { if (history.isReady() && realtime.isReady()) {