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