1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 09:10:26 +08:00

Fix web request failures not being correctly handled at an APIRequest level

This commit is contained in:
Dean Herbert
2018-06-03 13:01:52 +09:00
Unverified
parent 68910745d8
commit 645f6efce7
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ namespace osu.Game.Beatmaps
{
if (error is OperationCanceledException) return;
downloadNotification.State = ProgressNotificationState.Completed;
downloadNotification.State = ProgressNotificationState.Cancelled;
Logger.Error(error, "Beatmap download failed!");
currentDownloads.Remove(request);
};
+1
View File
@@ -73,6 +73,7 @@ namespace osu.Game.Online.API
throw new TimeoutException(@"API request timeout hit");
WebRequest = CreateWebRequest();
WebRequest.Failed += Fail;
WebRequest.AllowRetryOnTimeout = false;
WebRequest.AddHeader("Authorization", $"Bearer {api.AccessToken}");