Fix issue with AE unlocking in beforeSleep

This commit is contained in:
John Sully committed 2022-03-29 12:17:13 -04:00
1 parent 4d96f16852
commit 01e9a1eaa1
1 file changed
+3 -1
+3 -1
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*/);