mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-21 23:53:14 +01: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)
|
||||
a.Network.IncSerial()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user