mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:12:57 +08:00
Fix download manager potentially not handling cancel requests
This commit is contained in:
parent
1455b9e796
commit
89fa1be2c8
@ -92,8 +92,6 @@ namespace osu.Game.Database
|
||||
notification.CancelRequested += () =>
|
||||
{
|
||||
request.Cancel();
|
||||
currentDownloads.Remove(request);
|
||||
notification.State = ProgressNotificationState.Cancelled;
|
||||
return true;
|
||||
};
|
||||
|
||||
@ -109,11 +107,11 @@ namespace osu.Game.Database
|
||||
{
|
||||
DownloadFailed?.Invoke(request);
|
||||
|
||||
if (error is OperationCanceledException) return;
|
||||
|
||||
notification.State = ProgressNotificationState.Cancelled;
|
||||
Logger.Error(error, $"{HumanisedModelName.Titleize()} download failed!");
|
||||
currentDownloads.Remove(request);
|
||||
notification.State = ProgressNotificationState.Cancelled;
|
||||
|
||||
if (!(error is OperationCanceledException))
|
||||
Logger.Error(error, $"{HumanisedModelName.Titleize()} download failed!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user