fix for the server crash when the maxclients increased via config set

Former-commit-id: 34a97c447f8cb5753e0747b435c7ce1a5d381c47
This commit is contained in:
Kajaruban Surendran 2020-11-17 23:01:57 +00:00 committed by John Sully
parent 3366f914d4
commit 1b77279021

View File

@ -2273,7 +2273,7 @@ static int updateMaxclients(long long val, long long prev, const char **err) {
}
return 0;
}
for (int iel = 0; iel < MAX_EVENT_LOOPS; ++iel)
for (int iel = 0; iel < cserver.cthreads; ++iel)
{
if ((unsigned int) aeGetSetSize(g_pserver->rgthreadvar[iel].el) <
g_pserver->maxclients + CONFIG_FDSET_INCR)