Anton Kaliaev
2018-04-05 12:00:16 +02:00
parent 8e699c2bfd
commit 1585152341
+3 -10
View File
@@ -564,16 +564,9 @@ func (r *PEXReactor) crawlPeers() {
r.book.MarkAttempt(pi.Addr)
continue
}
}
// Crawl the connected peers asking for more addresses
for _, pi := range peerInfos {
// We will wait a minimum period of time before crawling peers again
if now.Sub(pi.LastAttempt) >= defaultCrawlPeerInterval {
peer := r.Switch.Peers().Get(pi.Addr.ID)
if peer != nil {
r.RequestAddrs(peer)
}
}
// Ask for more addresses
peer := r.Switch.Peers().Get(pi.Addr.ID)
r.RequestAddrs(peer)
}
}