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:
parent
123bf2e647
commit
bd2b43901d
4 changed files with 23 additions and 12 deletions
|
@ -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()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue