Skip to content

Commit

Permalink
Cluster: clusterDelNode(): remove node from master's slaves.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Feb 11, 2014
1 parent 4513d8f commit 0725988
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,11 @@ void clusterDelNode(clusterNode *delnode) {
}
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);
}

Expand Down

0 comments on commit 0725988

Please sign in to comment.