mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 05:52:55 +08:00
parent
89a05c086c
commit
4e06d5c7cd
@ -206,7 +206,17 @@ namespace osu.Game.Beatmaps
|
|||||||
PostNotification?.Invoke(downloadNotification);
|
PostNotification?.Invoke(downloadNotification);
|
||||||
|
|
||||||
// don't run in the main api queue as this is a long-running task.
|
// don't run in the main api queue as this is a long-running task.
|
||||||
Task.Factory.StartNew(() => request.Perform(api), TaskCreationOptions.LongRunning);
|
Task.Factory.StartNew(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
request.Perform(api);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
// no need to handle here as exceptions will filter down to request.Failure above.
|
||||||
|
}
|
||||||
|
}, TaskCreationOptions.LongRunning);
|
||||||
BeatmapDownloadBegan?.Invoke(request);
|
BeatmapDownloadBegan?.Invoke(request);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user