Skip to content

Commit

Permalink
Retry on HTTP error
Browse files Browse the repository at this point in the history
When there was a 404 error for example it would retry the request, but this should not be the case since it will just come back with the same error. It should only retry when there is a network error.
  • Loading branch information
aang521 authored Jan 31, 2020
1 parent 3f57677 commit e8b6706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Proyecto26.RestClient/Helpers/HttpBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static IEnumerator CreateRequestAndRetry(RequestHelper options, Action<Re
callback(null, response);
break;
}
else if (!options.IsAborted && retries < options.Retries)
else if (!options.IsAborted && retries < options.Retries && request.isNetworkError)
{
yield return new WaitForSeconds(options.RetrySecondsDelay);
retries++;
Expand Down

0 comments on commit e8b6706

Please sign in to comment.