Commit 5da1e640 authored by antirez's avatar antirez
Browse files

Cluster: don't allow CLUSTER SETSLOT with slaves.

parent 53edd42a
......@@ -3945,6 +3945,11 @@ void clusterCommand(redisClient *c) {
int slot;
clusterNode *n;
if (nodeIsSlave(myself)) {
addReplyError(c,"Please use SETSLOT only with masters.");
return;
}
if ((slot = getSlotOrReply(c,c->argv[2])) == -1) return;
if (!strcasecmp(c->argv[3]->ptr,"migrating") && c->argc == 5) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment