We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26bf039 commit df1dbbdCopy full SHA for df1dbbd
RedditSharp/WebAgent.cs
@@ -116,9 +116,11 @@ public virtual async Task<JToken> ExecuteRequestAsync(Func<HttpRequestMessage> r
116
await RateLimiter.ReadHeadersAsync(response);
117
++tries;
118
} while(
119
- //only retry if 500 or 503
+ // only retry if 500, 502, 503, or 504
120
(response.StatusCode == System.Net.HttpStatusCode.InternalServerError ||
121
- response.StatusCode == System.Net.HttpStatusCode.ServiceUnavailable)
+ response.StatusCode == System.Net.HttpStatusCode.BadGateway ||
122
+ response.StatusCode == System.Net.HttpStatusCode.ServiceUnavailable ||
123
+ response.StatusCode == System.Net.HttpStatusCode.GatewayTimeout)
124
&& tries < maxTries
125
);
126
if (!response.IsSuccessStatusCode)
0 commit comments