Skip to content

Commit

Permalink
fix(share/p2p/shrexeds): return correct err on context error (#2177)
Browse files Browse the repository at this point in the history
Resolves item 7 on
#2176
  • Loading branch information
derrandz authored May 10, 2023
1 parent 7f556f0 commit a57ad56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/p2p/shrexeds/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *Client) RequestEDS(
log.Debugw("client: eds request to peer failed", "peer", peer, "hash", dataHash.String(), "error", err)
if errors.Is(err, context.DeadlineExceeded) || errors.Is(err, context.Canceled) {
c.metrics.ObserveRequests(1, p2p.StatusTimeout)
return nil, ctx.Err()
return nil, err
}
// some net.Errors also mean the context deadline was exceeded, but yamux/mocknet do not
// unwrap to a ctx err
Expand Down

0 comments on commit a57ad56

Please sign in to comment.