Prevent a deadlock when running CLIENT KILL with large numbers of clients (#206)
This commit is contained in:
parent
cc8ed88577
commit
9ab1278cf1
@ -3257,16 +3257,18 @@ NULL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int iel = client->iel;
|
|
||||||
freeClientAsync(client);
|
freeClientAsync(client);
|
||||||
aePostFunction(g_pserver->rgthreadvar[client->iel].el, [iel] { // note: failure is OK
|
|
||||||
freeClientsInAsyncFreeQueue(iel);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
killed++;
|
killed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int iel = 0; iel < cserver.cthreads; ++iel) {
|
||||||
|
aePostFunction(g_pserver->rgthreadvar[iel].el, [iel] { // note: failure is OK
|
||||||
|
freeClientsInAsyncFreeQueue(iel);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* Reply according to old/new format. */
|
/* Reply according to old/new format. */
|
||||||
if (c->argc == 3) {
|
if (c->argc == 3) {
|
||||||
if (killed == 0)
|
if (killed == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user