mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Cluster: don't allow CLUSTER SETSLOT with slaves.
This commit is contained in:
parent
f43c794b0b
commit
524be1e465
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user