]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - helpers/utils.js
Error handling mini refractoring
[github/Chocobozzz/PeerTube.git] / helpers / utils.js
1 ;(function () {
2 'use strict'
3
4 var logger = require('./logger')
5
6 var utils = {
7 cleanForExit: cleanForExit
8 }
9
10 function cleanForExit (webtorrent_process) {
11 logger.info('Gracefully exiting.')
12 process.kill(-webtorrent_process.pid)
13 }
14
15 // ---------------------------------------------------------------------------
16
17 module.exports = utils
18 })()