Fix issue with AE unlocking in beforeSleep

This commit is contained in:
John Sully 2022-03-29 12:17:13 -04:00
parent 8eaede1c61
commit 7fb077ff2f

View File

@ -2926,12 +2926,14 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
std::unique_lock<fastlock> ul(g_lockasyncfree);
if (listLength(g_pserver->clients_to_close)) {
ul.unlock();
locker.disarm();
handleClientsWithPendingWrites(iel, aof_state);
locker.arm();
fSentReplies = true;
} else {
ul.unlock();
}
ul.unlock();
if (!serverTL->gcEpoch.isReset())
g_pserver->garbageCollector.endEpoch(serverTL->gcEpoch, true /*fNoFree*/);