提交 dc215357 作者: rht

Remove ctx timeout in unixfsNode GetChild

License: MIT
Signed-off-by: 's avatarrht <rhtbot@gmail.com>
上级 30e03b2d
...@@ -2,7 +2,6 @@ package helpers ...@@ -2,7 +2,6 @@ package helpers
import ( import (
"fmt" "fmt"
"time"
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
key "github.com/ipfs/go-ipfs/blocks/key" key "github.com/ipfs/go-ipfs/blocks/key"
...@@ -78,9 +77,6 @@ func (n *UnixfsNode) NumChildren() int { ...@@ -78,9 +77,6 @@ func (n *UnixfsNode) NumChildren() int {
} }
func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds dag.DAGService) (*UnixfsNode, error) { func (n *UnixfsNode) GetChild(ctx context.Context, i int, ds dag.DAGService) (*UnixfsNode, error) {
ctx, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
nd, err := n.node.Links[i].GetNode(ctx, ds) nd, err := n.node.Links[i].GetNode(ctx, ds)
if err != nil { if err != nil {
return nil, err return nil, err
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论