Fix multithread test failures

Former-commit-id: 7c39a9b0e193f5c0b327ff21cd49210037142642
This commit is contained in:
John Sully 2020-10-23 15:57:39 +00:00
parent dcd6d809aa
commit c88a19bc5e

View File

@ -1915,10 +1915,8 @@ void ProcessPendingAsyncWrites()
if (c->fPendingAsyncWriteHandler.compare_exchange_strong(expected, true)) {
bool fResult = c->postFunction([](client *c) {
c->fPendingAsyncWriteHandler = false;
if (c->bufpos || listLength(c->reply) || (c->flags & CLIENT_PENDING_WRITE)) {
clientInstallWriteHandler(c);
handleClientsWithPendingWrites(c->iel, g_pserver->aof_state);
}
clientInstallWriteHandler(c);
handleClientsWithPendingWrites(c->iel, g_pserver->aof_state);
}, false);
if (!fResult)