fix return wrong value of clusterDelNodeSlots

This commit is contained in:
Leon Chen 2017-07-20 17:24:38 +08:00 committed by antirez
parent dc782ceb83
commit 62474219d0

View File

@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) {
int deleted = 0, j;
for (j = 0; j < CLUSTER_SLOTS; j++) {
if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j);
deleted++;
if (clusterNodeGetSlotBit(node,j)) {
clusterDelSlot(j);
deleted++;
}
}
return deleted;
}