mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 11:27:24 +08:00
Fix web request failures not being correctly handled at an APIRequest level
This commit is contained in:
parent
68910745d8
commit
645f6efce7
@ -170,7 +170,7 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
if (error is OperationCanceledException) return;
|
if (error is OperationCanceledException) return;
|
||||||
|
|
||||||
downloadNotification.State = ProgressNotificationState.Completed;
|
downloadNotification.State = ProgressNotificationState.Cancelled;
|
||||||
Logger.Error(error, "Beatmap download failed!");
|
Logger.Error(error, "Beatmap download failed!");
|
||||||
currentDownloads.Remove(request);
|
currentDownloads.Remove(request);
|
||||||
};
|
};
|
||||||
|
@ -73,6 +73,7 @@ namespace osu.Game.Online.API
|
|||||||
throw new TimeoutException(@"API request timeout hit");
|
throw new TimeoutException(@"API request timeout hit");
|
||||||
|
|
||||||
WebRequest = CreateWebRequest();
|
WebRequest = CreateWebRequest();
|
||||||
|
WebRequest.Failed += Fail;
|
||||||
WebRequest.AllowRetryOnTimeout = false;
|
WebRequest.AllowRetryOnTimeout = false;
|
||||||
WebRequest.AddHeader("Authorization", $"Bearer {api.AccessToken}");
|
WebRequest.AddHeader("Authorization", $"Bearer {api.AccessToken}");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user