Completed get/set configuration
For debugging of "outbound flow" Mostly, a few things still missing
This commit is contained in:
parent
1f0976a26c
commit
7e185db141
6 changed files with 109 additions and 80 deletions
|
|
@ -81,10 +81,7 @@ func (device *Device) RemovePeer(key NoisePublicKey) {
|
|||
peer.mutex.Lock()
|
||||
device.routingTable.RemovePeer(peer)
|
||||
delete(device.peers, key)
|
||||
}
|
||||
|
||||
func (device *Device) RemoveAllAllowedIps(peer *Peer) {
|
||||
|
||||
peer.Close()
|
||||
}
|
||||
|
||||
func (device *Device) RemoveAllPeers() {
|
||||
|
|
@ -93,8 +90,7 @@ func (device *Device) RemoveAllPeers() {
|
|||
|
||||
for key, peer := range device.peers {
|
||||
peer.mutex.Lock()
|
||||
device.routingTable.RemovePeer(peer)
|
||||
delete(device.peers, key)
|
||||
peer.mutex.Unlock()
|
||||
peer.Close()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue