diff --git a/management/server/account.go b/management/server/account.go index bf2d970ce..2b4e2e97d 100644 --- a/management/server/account.go +++ b/management/server/account.go @@ -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() }