4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-09-18 12:12:30 +00:00

bugfixes related to peer timeouts in the DHT, significantly improve DHT bootstrap speed

This commit is contained in:
Arceliar
2018-05-17 21:20:31 -05:00
parent 8d9887294c
commit fe518f4e3f
3 changed files with 57 additions and 39 deletions

View File

@@ -77,7 +77,8 @@ func (r *router) mainLoop() {
case p := <-r.send:
r.sendPacket(p)
case info := <-r.core.dht.peers:
r.core.dht.insertIfNew(info, true)
r.core.dht.insertIfNew(info, false) // Insert as a normal node
r.core.dht.insertIfNew(info, true) // Insert as a peer
case <-r.reset:
r.core.sessions.resetInits()
r.core.dht.reset()