Make graceful shutdown more graceful by actually waiting for sockets (and others) to close. Ongoing effort.

This commit is contained in:
Simo Kinnunen
2014-04-12 16:16:03 +09:00
parent 123bf2e647
commit bd2b43901d
4 changed files with 23 additions and 12 deletions

View File

@@ -46,4 +46,9 @@ module.exports = function(options) {
timer = setInterval(reap, options.reapInterval)
log.info('Reaping devices with no heartbeat')
lifecycle.observe(function() {
clearTimeout(timer)
push.close()
})
}