Catch exception @ createServer() e.g. if no PK exists for ssh.js
This commit is contained in:
parent
a49b510f31
commit
9fa044119b
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue