mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 21:10:29 +00:00
Don't block on adding peers in case one is unreachable and we are forced to wait for timeout
This commit is contained in:
parent
02c99d3e7d
commit
618d46a7b3
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user