HTTP Client custom retry function whether this situation will be abnormal
Open
NeedsInvestigation
- Dominant language
- Go
- Stars
- 7.4k
- Forks
- 643
- Avg merge
- 14h 5m
- Merged PRs (30d)
- 2
Description
**Describe the Question**
The http Client custom retry function will have an exception when canIdempotentRetry is false?
**Reproducible Code**

**Expected behavior**
if canIdempotentRetry && client.DefaultRetryIf(req, resp, err) && errors.Is(err, errs.ErrBadPoolConn) {
connAttempts++
continue
}
if isDefaultRetryFunc {
break
}
attempts++
if attempts >= maxAttempts {
break
}
// Check whether this request should be retried
if canIdempotentRetry && !isRequestRetryable(req, resp, err) {
break
}
Would it be better to write like this?
Contributor guide
Assessment
This issue has not been assessed yet.