Skip to content

Commit

Permalink
Merge pull request ipfs#219 from libp2p/fix/dht-query-hang
Browse files Browse the repository at this point in the history
fix a potential DHT query hang
  • Loading branch information
Stebalien committed Dec 27, 2018
2 parents c3adc43 + eb3e7fe commit 627b5f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down

0 comments on commit 627b5f9

Please sign in to comment.