mirror of
https://github.com/netbirdio/netbird.git
synced 2025-04-11 13:08:51 +02:00
Disable route when removing peer (#582)
This commit is contained in:
parent
a78fd69f80
commit
fcf7786a85
@ -252,6 +252,14 @@ func (a *Account) DeletePeer(peerPubKey string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, r := range a.Routes {
|
||||||
|
if r.Peer == peerPubKey {
|
||||||
|
r.Enabled = false
|
||||||
|
r.Peer = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete(a.Peers, peerPubKey)
|
delete(a.Peers, peerPubKey)
|
||||||
a.Network.IncSerial()
|
a.Network.IncSerial()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user