Skip to content

Commit

Permalink
Disable route when removing peer (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini authored Nov 25, 2022
1 parent a78fd69 commit fcf7786
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions management/server/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit fcf7786

Please sign in to comment.