fixed #2214 - each individual thread will create its own logrotate write handler, because if one is closed, everything crashes in a cascade effect because we're calling .write() after .end(), bleh.

This commit is contained in:
Julian Lam
2014-10-03 01:09:35 -04:00
parent ee289c3226
commit b7ba6a0d8f
3 changed files with 12 additions and 14 deletions

View File

@@ -129,7 +129,7 @@ if(nconf.get('ssl')) {
}
};
module.exports.listen = function() {
module.exports.listen = function(callback) {
var bind_address = ((nconf.get('bind_address') === "0.0.0.0" || !nconf.get('bind_address')) ? '0.0.0.0' : nconf.get('bind_address')) + ':' + port;
winston.info('NodeBB attempting to listen on: ' + bind_address);
@@ -142,6 +142,10 @@ if(nconf.get('ssl')) {
primary: process.env.handle_jobs === 'true'
});
}
if (typeof callback === 'function') {
callback();
}
});
};