This commit is contained in:
gospider
2025-02-21 17:33:37 +08:00
parent aa1de1c0c7
commit 38cf78362c
5 changed files with 33 additions and 113 deletions

View File

@@ -425,13 +425,6 @@ func (obj *roundTripper) RoundTrip(ctx *Response) (err error) {
currentRetry--
}
}
if currentRetry > maxRetryCount {
if task.err == nil {
task.err = fmt.Errorf("roundTrip retry %d times", maxRetryCount)
} else {
task.err = tools.WrapError(err, fmt.Errorf("roundTrip retry %d times", maxRetryCount))
}
}
if task.err == nil && ctx.option.RequestCallBack != nil {
if err = ctx.option.RequestCallBack(ctx); err != nil {
task.err = err