-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:when SetRetryCount -1, both resp and error are nil. #392
Conversation
Codecov Report
@@ Coverage Diff @@
## master #392 +/- ##
=======================================
Coverage 95.97% 95.97%
=======================================
Files 10 10
Lines 1019 1019
=======================================
Hits 978 978
Misses 23 23
Partials 18 18 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yjhmelody Thanks for creating a PR. I'm sorry I'm not able to grasp the outcome.
Can you explain and help me to understand?
https://github.com/go-resty/resty/blob/master/retry.go#L87 for attempt := 0; attempt <= opts.maxRetries; attempt++ {
... opts.MaxRetries is |
@yjhmelody This PR contains new test cases added. But you mentioned it as "fix". What is the bug and fix you're submitting? |
I created issue #404 to track the actual issue reported in the PR. |
@moorereason Oh, let we choose the second solution ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yjhmelody Thanks for your contributions. I'm really sorry for the delay, due to personal reasons.
I add a test for this behavior, I think it is a bug.