From 618d46a7b30bb7e491591ebeb3f15ad40e41021d Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 6 Jul 2019 12:12:30 +0100 Subject: [PATCH] Don't block on adding peers in case one is unreachable and we are forced to wait for timeout --- src/yggdrasil/core.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/core.go b/src/yggdrasil/core.go index 3a7f9f1b..62d89a8b 100644 --- a/src/yggdrasil/core.go +++ b/src/yggdrasil/core.go @@ -88,14 +88,14 @@ func (c *Core) addPeerLoop() { // Add peers from the Peers section for _, peer := range current.Peers { - c.AddPeer(peer, "") + go c.AddPeer(peer, "") time.Sleep(time.Second) } // Add peers from the InterfacePeers section for intf, intfpeers := range current.InterfacePeers { for _, peer := range intfpeers { - c.AddPeer(peer, intf) + go c.AddPeer(peer, intf) time.Sleep(time.Second) } }