1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-25 10:27:01 +08:00

added cancel func calls previously ignored

This commit is contained in:
Juan Batiz-Benet
2015-03-07 09:31:46 -08:00
parent dfe2b16763
commit 1d5b903611
10 changed files with 27 additions and 13 deletions

View File

@ -86,7 +86,8 @@ func (r *Reader) writeToBuf(dagnode *mdag.Node, path string, depth int) {
}
r.flush()
ctx, _ := context.WithTimeout(context.TODO(), time.Second*60)
ctx, cancel := context.WithTimeout(context.TODO(), time.Second*60)
defer cancel()
for i, ng := range r.dag.GetDAG(ctx, dagnode) {
childNode, err := ng.Get()