提交 32ef57c4 作者: Dirk McCormick

Return ErrNotFound when zero values are returned from DHT namesys resolve

License: MIT
Signed-off-by: 's avatarDirk McCormick <dirkmdev@gmail.com>
上级 5202f76d
...@@ -202,6 +202,10 @@ func (r *routingResolver) getValue(ctx context.Context, ipnsKey string, options ...@@ -202,6 +202,10 @@ func (r *routingResolver) getValue(ctx context.Context, ipnsKey string, options
} }
} }
if len(recs) == 0 {
return nil, routing.ErrNotFound
}
i, err := IpnsSelectorFunc(ipnsKey, recs) i, err := IpnsSelectorFunc(ipnsKey, recs)
if err != nil { if err != nil {
return nil, err return nil, err
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论