Cluster: clusterDelNode(): remove node from master's slaves.

This commit is contained in:
antirez 2014-02-11 10:34:14 +01:00
parent 5e0e03be41
commit db6d628c3e

View File

@ -664,7 +664,11 @@ void clusterDelNode(clusterNode *delnode) {
} }
dictReleaseIterator(di); dictReleaseIterator(di);
/* 3) Free the node, unlinking it from the cluster. */ /* 3) Remove this node from its master's slaves if needed. */
if (nodeIsSlave(delnode) && delnode->slaveof)
clusterNodeRemoveSlave(delnode->slaveof,delnode);
/* 4) Free the node, unlinking it from the cluster. */
freeClusterNode(delnode); freeClusterNode(delnode);
} }