summaryrefslogtreecommitdiffhomepage
path: root/src/device.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.go')
-rw-r--r--src/device.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/device.go b/src/device.go
index a7a5c7b..52ac6a4 100644
--- a/src/device.go
+++ b/src/device.go
@@ -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()
}
}