Skip to content

Commit

Permalink
Merge pull request #3345 from ipfs/fix/namesys/error-return
Browse files Browse the repository at this point in the history
namesys: return right after errors
  • Loading branch information
whyrusleeping authored Nov 3, 2016
2 parents 1261b90 + b78b29c commit 9d132e7
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 9d132e7

Please sign in to comment.