Add debug assert on duplicate freeClientAsync (#896)
When debug assert mode enabled, verify that we don't insert the same client twice into server.clients_to_close. Signed-off-by: naglera <anagler123@gmail.com>
This commit is contained in:
parent
188975a119
commit
4bde0ab3ce
@ -1775,6 +1775,7 @@ void freeClient(client *c) {
|
||||
void freeClientAsync(client *c) {
|
||||
if (c->flag.close_asap || c->flag.script) return;
|
||||
c->flag.close_asap = 1;
|
||||
debugServerAssertWithInfo(c, NULL, listSearchKey(server.clients_to_close, c) == NULL);
|
||||
listAddNodeTail(server.clients_to_close, c);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user