mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Send peer state when adding peers
Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user