Fix arbitrary API request errors getting identified as timeouts

This commit is contained in:
Dean Herbert 2018-03-06 17:29:22 +09:00
parent a6460832f4
commit 07bf8549eb
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{