1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 06:27:18 +08:00

Merge pull request #2177 from peppy/api-error-shouldnt-retry

Fix arbitrary API request errors getting identified as timeouts
This commit is contained in:
Dean Herbert 2018-03-07 16:58:54 +09:00 committed by GitHub
commit 9aa52db2c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ namespace osu.Game.Online.API
}
catch (WebException we)
{
HttpStatusCode statusCode = (we.Response as HttpWebResponse)?.StatusCode ?? HttpStatusCode.RequestTimeout;
HttpStatusCode statusCode = (we.Response as HttpWebResponse)?.StatusCode ?? (we.Status == WebExceptionStatus.UnknownError ? HttpStatusCode.NotAcceptable : HttpStatusCode.RequestTimeout);
switch (statusCode)
{