Skip to content

Commit

Permalink
namesys: return right after errors
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
  • Loading branch information
whyrusleeping committed Nov 1, 2016
1 parent 9eba0e4 commit b78b29c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions namesys/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}()

Expand All @@ -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
}()
Expand Down

0 comments on commit b78b29c

Please sign in to comment.