Commit bb35e40b authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #3703 from ipfs/fix/format-in-merkledag

Fix formatting in merkledag.go
parents 765fb0f6 67a3a67a
......@@ -399,12 +399,12 @@ func EnumerateChildrenAsync(ctx context.Context, ds DAGService, c *cid.Cid, visi
done := make(chan struct{})
var setlk sync.Mutex
errChan := make(chan error)
fetchersCtx, cancel := context.WithCancel(ctx)
defer cancel()
for i := 0; i < FetchGraphConcurrency; i++ {
go func() {
for ic := range feed {
......@@ -413,11 +413,11 @@ func EnumerateChildrenAsync(ctx context.Context, ds DAGService, c *cid.Cid, visi
errChan <- err
return
}
setlk.Lock()
unseen := visit(ic)
setlk.Unlock()
if unseen {
select {
case out <- n:
......@@ -466,7 +466,7 @@ func EnumerateChildrenAsync(ctx context.Context, ds DAGService, c *cid.Cid, visi
}
case err := <-errChan:
return err
case <-ctx.Done():
return ctx.Err()
}
......
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