Commit 524be1e4 authored by antirez's avatar antirez
Browse files

Cluster: don't allow CLUSTER SETSLOT with slaves.

parent f43c794b
......@@ -3940,6 +3940,11 @@ void clusterCommand(client *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