mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
Disable route when removing peer (#582)
This commit is contained in:
@@ -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)
|
||||
a.Network.IncSerial()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user