Unverified Commit 627b5f96 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #219 from libp2p/fix/dht-query-hang

fix a potential DHT query hang
parents c3adc437 eb3e7fe9
......@@ -209,6 +209,8 @@ func (r *dhtQueryRunner) spawnWorkers(proc process.Process) {
select {
case p, more := <-r.peersToQuery.DeqChan:
if !more {
// Put this back so we can finish any outstanding queries.
r.rateLimit <- struct{}{}
return // channel closed.
}
......
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