This commit is contained in:
wstar05 2026-02-04 04:52:43 +07:00 committed by GitHub
commit 1c425dd136
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2212,6 +2212,11 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
node->tls_port = msg_tls_port;
node->cport = ntohs(g->cport);
node->flags &= ~CLUSTER_NODE_NOADDR;
/* Check if this is our master and we have to change the
* replication target as well. */
if (nodeIsSlave(myself) && myself->slaveof == node)
replicationSetMaster(node->ip, getNodeDefaultReplicationPort(node));
}
} else if (!node) {
/* If it's not in NOADDR state and we don't have it, we