mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09: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 += () =>
|
notification.CancelRequested += () =>
|
||||||
{
|
{
|
||||||
request.Cancel();
|
request.Cancel();
|
||||||
currentDownloads.Remove(request);
|
|
||||||
notification.State = ProgressNotificationState.Cancelled;
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,11 +107,11 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
DownloadFailed?.Invoke(request);
|
DownloadFailed?.Invoke(request);
|
||||||
|
|
||||||
if (error is OperationCanceledException) return;
|
|
||||||
|
|
||||||
notification.State = ProgressNotificationState.Cancelled;
|
|
||||||
Logger.Error(error, $"{HumanisedModelName.Titleize()} download failed!");
|
|
||||||
currentDownloads.Remove(request);
|
currentDownloads.Remove(request);
|
||||||
|
notification.State = ProgressNotificationState.Cancelled;
|
||||||
|
|
||||||
|
if (!(error is OperationCanceledException))
|
||||||
|
Logger.Error(error, $"{HumanisedModelName.Titleize()} download failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user