1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Fix one more instance of improperly handled cancellation

This commit is contained in:
Dean Herbert 2019-06-10 13:48:58 +09:00
parent e12b03e275
commit b79fdfc12f
2 changed files with 5 additions and 2 deletions

View File

@ -436,8 +436,7 @@ namespace osu.Game.Beatmaps
private void perform(BeatmapInfo beatmap, CancellationToken cancellation)
{
if (cancellation.IsCancellationRequested)
return;
cancellation.ThrowIfCancellationRequested();
if (api?.State != APIState.Online)
return;

View File

@ -361,6 +361,10 @@ namespace osu.Game.Database
Logger.Log($"Import of {item} successfully completed!", LoggingTarget.Database);
}
catch (TaskCanceledException)
{
throw;
}
catch (Exception e)
{
Logger.Error(e, $"Import of {item} failed and has been rolled back.", LoggingTarget.Database);