Use res.NextSync() instead of res.Next() to avoid using a channel.

This commit is contained in:
Kevin Atkinson 2016-11-22 18:03:27 -05:00
parent a72dd86fa6
commit ce68333cce

View File

@ -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