Commit bf670e07 authored by antirez's avatar antirez
Browse files

Cluster: don't update slave's master if we don't know it.

There is no way we can update the slave's node->slaveof pointer if we
don't know the master (no node with such an ID in our tables).
parent a3755ae9
......@@ -1363,7 +1363,7 @@ int clusterProcessPacket(clusterLink *link) {
}
/* Master node changed for this slave? */
if (sender->slaveof != master) {
if (master && sender->slaveof != master) {
if (sender->slaveof)
clusterNodeRemoveSlave(sender->slaveof,sender);
clusterNodeAddSlave(master,sender);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment