Skip to content

Commit e8b6706

Browse files
authored
Retry on HTTP error
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.
1 parent 3f57677 commit e8b6706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Proyecto26.RestClient/Helpers/HttpBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static IEnumerator CreateRequestAndRetry(RequestHelper options, Action<Re
2323
callback(null, response);
2424
break;
2525
}
26-
else if (!options.IsAborted && retries < options.Retries)
26+
else if (!options.IsAborted && retries < options.Retries && request.isNetworkError)
2727
{
2828
yield return new WaitForSeconds(options.RetrySecondsDelay);
2929
retries++;

0 commit comments

Comments
 (0)