提交 93b06f34 作者: Jeromy

Add timeout to ipns resolution at startup

上级 1d5f68cd
......@@ -159,8 +159,10 @@ func (fs *Filesystem) newKeyRoot(parent context.Context, k ci.PrivKey) (*KeyRoot
}
}
mnode, err := fs.dserv.Get(ctx, pointsTo)
tctx, _ := context.WithTimeout(parent, time.Second*5)
mnode, err := fs.dserv.Get(tctx, pointsTo)
if err != nil {
log.Errorf("Failed to retreive value '%s' for ipns entry: %s\n", pointsTo, err)
return nil, err
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论