From 5ddf84f32991ae8bda3361cbbbea7c46294e97d3 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 3 Feb 2019 15:22:14 -0600 Subject: [PATCH] remove peers completely after a long switch timeout, this could use some improvement later --- src/yggdrasil/switch.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index f2adf3fb..db39d010 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -281,6 +281,7 @@ func (t *switchTable) cleanPeers() { if now.Sub(peer.time) > switch_timeout+switch_throttle { // Longer than switch_timeout to make sure we don't remove a working peer because the root stopped responding. delete(t.data.peers, port) + go t.core.peers.removePeer(port) // TODO figure out if it's safe to do this without a goroutine, or make it safe } } if _, isIn := t.data.peers[t.parent]; !isIn {