Cluster: don't allow CLUSTER SETSLOT with slaves.

This commit is contained in:
antirez 2016-01-11 15:00:45 +01:00
parent a7ec6d1ffa
commit 6ce536db49

View File

@ -3945,6 +3945,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) {