mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 02:22:13 +00:00
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
2ce96c0fa7
commit
df346bca39
@ -224,7 +224,6 @@ void ACLFreeUser(user *u) {
|
||||
* connections in order to kill all the pending ones that
|
||||
* are authenticated with such user. */
|
||||
void ACLFreeUserAndKillClients(user *u) {
|
||||
ACLFreeUser(u);
|
||||
listIter li;
|
||||
listNode *ln;
|
||||
listRewind(server.clients,&li);
|
||||
@ -242,6 +241,7 @@ void ACLFreeUserAndKillClients(user *u) {
|
||||
freeClientAsync(c);
|
||||
}
|
||||
}
|
||||
ACLFreeUser(u);
|
||||
}
|
||||
|
||||
/* Copy the user ACL rules from the source user 'src' to the destination
|
||||
|
Loading…
x
Reference in New Issue
Block a user