mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Cluster: when slave changes master, remove it from the old master.
This commit is contained in:
parent
70091a2f63
commit
c39e34d007
@ -933,6 +933,8 @@ int clusterProcessPacket(clusterLink *link) {
|
||||
|
||||
/* Master node changed for this slave? */
|
||||
if (sender->slaveof != master) {
|
||||
if (sender->slaveof)
|
||||
clusterNodeRemoveSlave(sender->slaveof,sender);
|
||||
clusterNodeAddSlave(master,sender);
|
||||
sender->slaveof = master;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user