1
0
Fork 0
peertube/helpers/utils.js

19 lines
365 B
JavaScript
Raw Normal View History

2015-06-09 15:41:40 +00:00
;(function () {
'use strict'
var logger = require('./logger')
2016-01-31 10:23:52 +00:00
var utils = {
2016-02-05 17:03:20 +00:00
cleanForExit: cleanForExit
2015-06-09 15:41:40 +00:00
}
2016-01-31 10:23:52 +00:00
function cleanForExit (webtorrent_process) {
2016-02-05 18:02:05 +00:00
logger.info('Gracefully exiting.')
process.kill(-webtorrent_process.pid)
}
2016-01-31 10:23:52 +00:00
// ---------------------------------------------------------------------------
2015-06-09 15:41:40 +00:00
module.exports = utils
})()