mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-28 15:29:09 +01:00
Prevent updates on flapping status
This commit is contained in:
@@ -146,6 +146,11 @@ func (d *Status) UpdatePeerState(receivedState State) error {
|
|||||||
|
|
||||||
d.peers[receivedState.PubKey] = peerState
|
d.peers[receivedState.PubKey] = peerState
|
||||||
|
|
||||||
|
if receivedState.ConnStatus == StatusConnecting ||
|
||||||
|
(receivedState.ConnStatus == StatusDisconnected && peerState.ConnStatus == StatusConnecting) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
ch, found := d.changeNotify[receivedState.PubKey]
|
ch, found := d.changeNotify[receivedState.PubKey]
|
||||||
if found && ch != nil {
|
if found && ch != nil {
|
||||||
close(ch)
|
close(ch)
|
||||||
|
|||||||
Reference in New Issue
Block a user