mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Merge pull request #3603 from oranagra/adjustOpenFilesLimit_overflow
fix unsigned int overflow in adjustOpenFilesLimit
This commit is contained in:
commit
2988889db1
@ -1575,9 +1575,9 @@ void adjustOpenFilesLimit(void) {
|
||||
if (bestlimit < oldlimit) bestlimit = oldlimit;
|
||||
|
||||
if (bestlimit < maxfiles) {
|
||||
int old_maxclients = server.maxclients;
|
||||
server.maxclients = bestlimit-CONFIG_MIN_RESERVED_FDS;
|
||||
if (server.maxclients < 1) {
|
||||
unsigned int old_maxclients = server.maxclients;
|
||||
server.maxclients = bestlimit-CONFIG_MIN_RESERVED_FDS; /* NOTICE: server.maxclients is unsigned */
|
||||
if (bestlimit <= CONFIG_MIN_RESERVED_FDS) {
|
||||
serverLog(LL_WARNING,"Your current 'ulimit -n' "
|
||||
"of %llu is not enough for the server to start. "
|
||||
"Please increase your open file limit to at least "
|
||||
|
Loading…
x
Reference in New Issue
Block a user