Do not dereference a nullptr if there are too many files open
Former-commit-id: 4674eb29a261e8b046953398c94354fc3e550c2a
This commit is contained in:
parent
3b788bac1e
commit
57feba97d2
@ -3793,8 +3793,6 @@ static void initServerThread(struct redisServerThreadVars *pvar, int fMain)
|
|||||||
pvar->in_eval = 0;
|
pvar->in_eval = 0;
|
||||||
pvar->in_exec = 0;
|
pvar->in_exec = 0;
|
||||||
pvar->el = aeCreateEventLoop(g_pserver->maxclients+CONFIG_FDSET_INCR);
|
pvar->el = aeCreateEventLoop(g_pserver->maxclients+CONFIG_FDSET_INCR);
|
||||||
aeSetBeforeSleepProc(pvar->el, beforeSleep, AE_SLEEP_THREADSAFE);
|
|
||||||
aeSetAfterSleepProc(pvar->el, afterSleep, AE_SLEEP_THREADSAFE);
|
|
||||||
pvar->current_client = nullptr;
|
pvar->current_client = nullptr;
|
||||||
pvar->fRetrySetAofEvent = false;
|
pvar->fRetrySetAofEvent = false;
|
||||||
if (pvar->el == NULL) {
|
if (pvar->el == NULL) {
|
||||||
@ -3803,6 +3801,8 @@ static void initServerThread(struct redisServerThreadVars *pvar, int fMain)
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
aeSetBeforeSleepProc(pvar->el, beforeSleep, AE_SLEEP_THREADSAFE);
|
||||||
|
aeSetAfterSleepProc(pvar->el, afterSleep, AE_SLEEP_THREADSAFE);
|
||||||
|
|
||||||
fastlock_init(&pvar->lockPendingWrite, "lockPendingWrite");
|
fastlock_init(&pvar->lockPendingWrite, "lockPendingWrite");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user