Send peer state when adding peers

Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
Neil Twigg
2023-06-08 15:25:18 +01:00
parent c85db15a2c
commit 6d9955d212

View File

@@ -1474,12 +1474,6 @@ func (n *raft) Peers() []*Peer {
// Update our known set of peers.
func (n *raft) UpdateKnownPeers(knownPeers []string) {
n.Lock()
// If this is a scale up, let the normal add peer logic take precedence.
// Otherwise if the new peers are slow to start we stall ourselves.
if len(knownPeers) > len(n.peers) {
n.Unlock()
return
}
// Process like peer state update.
ps := &peerState{knownPeers, len(knownPeers), n.extSt}
n.processPeerState(ps)