mirror of https://github.com/BTCPrivate/z-nomp.git
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d6ee15e8f0
9
init.js
9
init.js
|
@ -51,6 +51,15 @@ try{
|
||||||
if (cluster.isMaster)
|
if (cluster.isMaster)
|
||||||
logger.warning('POSIX', 'Connection Limit', '(Safe to ignore) Must be ran as root to increase resource limits');
|
logger.warning('POSIX', 'Connection Limit', '(Safe to ignore) Must be ran as root to increase resource limits');
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
// Find out which user used sudo through the environment variable
|
||||||
|
var uid = parseInt(process.env.SUDO_UID);
|
||||||
|
// Set our server's uid to that user
|
||||||
|
if (uid) {
|
||||||
|
process.setuid(uid);
|
||||||
|
logger.debug('POSIX', 'Connection Limit', 'Raised to 100K concurrent connections, now running as non-root user: ' + process.getuid());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
if (cluster.isMaster)
|
if (cluster.isMaster)
|
||||||
|
|
Loading…
Reference in New Issue