Skip to content

Commit

Permalink
Only trace WroteRequest events when there's no error
Browse files Browse the repository at this point in the history
  • Loading branch information
na-- committed Dec 7, 2018
1 parent 6d30281 commit b154f44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/netext/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ func (t *Tracer) GotConn(info httptrace.GotConnInfo) {
// request and any body. It may be called multiple times
// in the case of retried requests.
func (t *Tracer) WroteRequest(info httptrace.WroteRequestInfo) {
atomic.StoreInt64(&t.wroteRequest, now())

if info.Err != nil {
if info.Err == nil {
atomic.StoreInt64(&t.wroteRequest, now())
} else {
t.addError(info.Err)
}
}
Expand Down

0 comments on commit b154f44

Please sign in to comment.