提交 b4d378f1 编写于 作者: A antirez

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.
上级 76e76732
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册