Cluster: added a missing return on CLUSTER SETSLOT.

This commit is contained in:
antirez 2013-02-27 17:53:48 +01:00
parent 7ddc0fe652
commit d2b8281b3f

View File

@ -1669,8 +1669,11 @@ void clusterCommand(redisClient *c) {
/* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */ /* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */
clusterNode *n = clusterLookupNode(c->argv[4]->ptr); clusterNode *n = clusterLookupNode(c->argv[4]->ptr);
if (!n) addReplyErrorFormat(c,"Unknown node %s", if (!n) {
addReplyErrorFormat(c,"Unknown node %s",
(char*)c->argv[4]->ptr); (char*)c->argv[4]->ptr);
return;
}
/* If this hash slot was served by 'myself' before to switch /* If this hash slot was served by 'myself' before to switch
* make sure there are no longer local keys for this hash slot. */ * make sure there are no longer local keys for this hash slot. */
if (server.cluster->slots[slot] == server.cluster->myself && if (server.cluster->slots[slot] == server.cluster->myself &&