mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-24 22:32:13 +00:00
Use res.NextSync() instead of res.Next() to avoid using a channel.
This commit is contained in:
parent
a72dd86fa6
commit
ce68333cce
@ -118,7 +118,11 @@ func loadProvSet(dstore ds.Datastore, k *cid.Cid) (*providerSet, error) {
|
||||
}
|
||||
|
||||
out := newProviderSet()
|
||||
for e := range res.Next() {
|
||||
for {
|
||||
e, ok := res.NextSync()
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
if e.Error != nil {
|
||||
log.Error("got an error: ", e.Error)
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user