Catch exception @ createServer() e.g. if no PK exists for ssh.js

This commit is contained in:
Bryan Ashby 2016-03-19 22:17:49 -06:00
parent a49b510f31
commit 9fa044119b
1 changed files with 7 additions and 1 deletions

View File

@ -200,7 +200,13 @@ function startListening(cb) {
}
const moduleInst = new module.getModule();
const server = moduleInst.createServer();
let server;
try {
server = moduleInst.createServer();
} catch(e) {
logger.log.warn(e, 'Exception caught creating server!');
return;
}
// :TODO: handle maxConnections, e.g. conf.maxConnections