1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

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

@ -5,6 +5,7 @@ var wire = require('../wire')
var wirerouter = require('../wire/router')
var wireutil = require('../wire/util')
var dbapi = require('../db/api')
var lifecycle = require('../util/lifecycle')
module.exports = function(options) {
var log = logger.createLogger('processor')
@ -91,4 +92,9 @@ module.exports = function(options) {
appDealer.send([channel, data])
})
.handler())
lifecycle.observe(function() {
appDealer.close()
devDealer.close()
})
}