Skip to content

Commit

Permalink
requester: Remove httpclient.Do errors from latency measurement (thra…
Browse files Browse the repository at this point in the history
…sher-corp#1072)

* remove httpclient.Do errors from latency measurement

* fix an oopsie
  • Loading branch information
geseq authored Nov 2, 2022
1 parent c4385af commit c2d4563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exchanges/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (r *Requester) doRequest(ctx context.Context, endpoint EndpointLimit, newRe

resp, err := r._HTTPClient.do(req)

if r.reporter != nil {
if r.reporter != nil && err == nil {
r.reporter.Latency(r.name, p.Method, p.Path, time.Since(start))
}

Expand Down

0 comments on commit c2d4563

Please sign in to comment.