// Run a timeout of 30s after which we exit the process
var timeout_webtorrent_process = setTimeout(function () {
- logger.error('Timeout : cannot run the webtorrent process. Please ensure you have electron-prebuilt npm package installed with xvfb-run.')
- process.exit()
+ throw new Error('Timeout : cannot run the webtorrent process. Please ensure you have electron-prebuilt npm package installed with xvfb-run.')
}, 30000)
ipc.server.on(processKey + '.ready', function () {
})
ipc.server.on(processKey + '.exception', function (data) {
- logger.error('Received exception error from webtorrent process.', { exception: data.exception })
- process.exit()
+ throw new Error('Received exception error from webtorrent process.' + data.exception)
})
var webtorrent_process = spawn(pathUtils.join(__dirname, 'webtorrentProcess.js'), host, port, { detached: true })