Commit 584343e1 authored by acud's avatar acud Committed by GitHub

kademlia: periodically connect to new peers (#364)

parent 50fb3f5f
......@@ -113,6 +113,12 @@ func (k *Kad) manage() {
select {
case <-k.quit:
return
case <-time.After(30 * time.Second):
// periodically try to connect to new peers
select {
case k.manageC <- struct{}{}:
default:
}
case <-k.manageC:
start = time.Now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment