ACL: ACLFreeUserAndKillClients(): free user later.
Soon or later we may have code in freeClient() that may have to deal with ACLs. Imagine for instance the command proposed multiple times (not sure if this will ever be accepted but still...): ONCLOSE DEL mykey Accumulating commands to run when a client is disconnected. Now the function is compatible with such use cases. Related to #5829.
This commit is contained in:
parent
5cfa46fd14
commit
3822a465f2
@ -224,7 +224,6 @@ void ACLFreeUser(user *u) {
|
|||||||
* connections in order to kill all the pending ones that
|
* connections in order to kill all the pending ones that
|
||||||
* are authenticated with such user. */
|
* are authenticated with such user. */
|
||||||
void ACLFreeUserAndKillClients(user *u) {
|
void ACLFreeUserAndKillClients(user *u) {
|
||||||
ACLFreeUser(u);
|
|
||||||
listIter li;
|
listIter li;
|
||||||
listNode *ln;
|
listNode *ln;
|
||||||
listRewind(server.clients,&li);
|
listRewind(server.clients,&li);
|
||||||
@ -242,6 +241,7 @@ void ACLFreeUserAndKillClients(user *u) {
|
|||||||
freeClientAsync(c);
|
freeClientAsync(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ACLFreeUser(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy the user ACL rules from the source user 'src' to the destination
|
/* Copy the user ACL rules from the source user 'src' to the destination
|
||||||
|
Loading…
x
Reference in New Issue
Block a user