We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3630432 commit 612f014Copy full SHA for 612f014
p2p/discover/table.go
@@ -278,14 +278,11 @@ func (tab *Table) refresh() {
278
for _, seed := range seeds {
279
glog.V(logger.Debug).Infoln("Seeding network with", seed)
280
}
281
- peers := append(tab.nursery, seeds...)
282
-
283
- // Bootstrap the table with a self lookup
284
- if len(peers) > 0 {
285
- tab.mutex.Lock()
286
- tab.add(peers)
287
- tab.mutex.Unlock()
+ nodes := append(tab.nursery, seeds...)
288
+ // Bond with all the seed nodes (will pingpong only if failed recently)
+ bonded := tab.bondall(nodes)
+ if len(bonded) > 0 {
289
tab.Lookup(tab.self.ID)
290
291
// TODO: the Kademlia paper says that we're supposed to perform
0 commit comments