mirror of https://github.com/ppy/osu
Fix arbitrary API request errors getting identified as timeouts
This commit is contained in:
parent
a6460832f4
commit
07bf8549eb
|
@ -199,7 +199,7 @@ private bool handleRequest(APIRequest req)
|
|||
}
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue