1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Better device present/absent handling by separating it from the status event.

This commit is contained in:
Simo Kinnunen 2014-02-03 19:42:20 +09:00
parent f432dc9fb9
commit 2086d7d439
9 changed files with 147 additions and 39 deletions

View file

@ -432,8 +432,14 @@ module.exports = function(options) {
}
function gracefullyExit() {
log.info('Bye')
process.exit(0)
if (isGrouped()) {
leaveGroup()
Promise.delay(500).then(gracefullyExit)
}
else {
log.info('Bye')
process.exit(0)
}
}
process.on('SIGINT', function() {