don't try and free a client that can't be freed

Former-commit-id: 7d3c5f1e64a79f47a103ce97c6991aa473fb697a
This commit is contained in:
John Sully 2020-12-11 03:59:39 +00:00
parent 51ef4343c4
commit 59a1d5085f

View File

@ -1542,7 +1542,7 @@ int freeClientsInAsyncFreeQueue(int iel) {
while((ln = listNext(&li)))
{
client *c = (client*)listNodeValue(ln);
if (c->iel == iel && !(c->flags & CLIENT_PROTECTED))
if (c->iel == iel && !(c->flags & CLIENT_PROTECTED) && !c->casyncOpsPending)
{
vecclientsFree.push_back(c);
listDelNode(g_pserver->clients_to_close, ln);