Fix crash with paused clients (accessed when global lock is not acquired)

Former-commit-id: 3c658b5012ed20f502976706e657cd2fa05e246c
This commit is contained in:
John Sully 2019-03-03 22:24:12 -05:00
parent 93ac479418
commit 459e6adb83

View File

@ -2832,6 +2832,7 @@ int clientsArePaused(void) {
if (server.clients_paused &&
server.clients_pause_end_time < server.mstime)
{
aeAcquireLock();
listNode *ln;
listIter li;
client *c;
@ -2849,6 +2850,7 @@ int clientsArePaused(void) {
if (c->flags & (CLIENT_SLAVE|CLIENT_BLOCKED)) continue;
queueClientForReprocessing(c);
}
aeReleaseLock();
}
return server.clients_paused;
}