bigbluebutton-Github/labs/bbb-webrtc-sfu/lib/screenshare/ScreenshareProcess.js

24 lines
708 B
JavaScript
Raw Normal View History

2017-10-13 21:50:17 +08:00
const ScreenshareManager = require('./ScreenshareManager');
const Logger = require('../utils/Logger');
const config = require('config');
if (config.get('acceptSelfSignedCertificate')) {
process.env.NODE_TLS_REJECT_UNAUTHORIZED=0;
}
2017-10-13 21:50:17 +08:00
let c = new ScreenshareManager();
process.on('uncaughtException', (error) => {
Logger.error('[ScreenshareProcess] Uncaught exception ', error.stack);
2017-10-13 21:50:17 +08:00
});
process.on('disconnect', c.stopAll);
// Added this listener to identify unhandled promises, but we should start making
// sense of those as we find them
process.on('unhandledRejection', (reason, p) => {
Logger.error('[ScreenshareProcess] Unhandled Rejection at: Promise', p, 'reason:', reason);
});
c.start();