mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
CLIENT KILL: don't kill the master as a normal client.
Technically the problem is due to the client type API that does not return a special value for the master, however fixing it locally in the CLIENT KILL command is better currently because otherwise we would introduce a new output buffer limit class as a side effect.
This commit is contained in:
parent
42231117a7
commit
97f1fc65cf
@ -1410,7 +1410,9 @@ void clientCommand(redisClient *c) {
|
||||
while ((ln = listNext(&li)) != NULL) {
|
||||
client = listNodeValue(ln);
|
||||
if (addr && strcmp(getClientPeerId(client),addr) != 0) continue;
|
||||
if (type != -1 && getClientType(client) != type) continue;
|
||||
if (type != -1 &&
|
||||
(client->flags & REDIS_MASTER ||
|
||||
getClientType(client) != type)) continue;
|
||||
if (id != 0 && client->id != id) continue;
|
||||
if (c == client && skipme) continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user