mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-24 20:07:45 +08:00
namesys: return right after errors
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
parent
9eba0e4ffb
commit
b78b29c8a3
@ -147,13 +147,16 @@ func (r *routingResolver) resolveOnce(ctx context.Context, name string) (path.Pa
|
||||
if err != nil {
|
||||
log.Warning("RoutingResolve get failed.")
|
||||
resp <- err
|
||||
return
|
||||
}
|
||||
|
||||
entry = new(pb.IpnsEntry)
|
||||
err = proto.Unmarshal(val, entry)
|
||||
if err != nil {
|
||||
resp <- err
|
||||
return
|
||||
}
|
||||
|
||||
resp <- nil
|
||||
}()
|
||||
|
||||
@ -162,7 +165,9 @@ func (r *routingResolver) resolveOnce(ctx context.Context, name string) (path.Pa
|
||||
pubk, err := routing.GetPublicKey(r.routing, ctx, hash)
|
||||
if err != nil {
|
||||
resp <- err
|
||||
return
|
||||
}
|
||||
|
||||
pubkey = pubk
|
||||
resp <- nil
|
||||
}()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user