mirror of
https://github.com/ppy/osu
synced 2025-02-17 19:07:07 +00:00
Add very basic error handling for failed beatmap detach
This commit is contained in:
parent
2033a5e157
commit
de208fd5c3
@ -10,6 +10,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using Realms;
|
||||
|
||||
namespace osu.Game.Database
|
||||
@ -59,15 +60,21 @@ namespace osu.Game.Database
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
realm.Run(_ =>
|
||||
try
|
||||
{
|
||||
var detached = frozenSets.Detach();
|
||||
realm.Run(_ =>
|
||||
{
|
||||
var detached = frozenSets.Detach();
|
||||
|
||||
detachedBeatmapSets.Clear();
|
||||
detachedBeatmapSets.AddRange(detached);
|
||||
detachedBeatmapSets.Clear();
|
||||
detachedBeatmapSets.AddRange(detached);
|
||||
});
|
||||
}
|
||||
finally
|
||||
{
|
||||
loaded.Set();
|
||||
});
|
||||
}, TaskCreationOptions.LongRunning);
|
||||
}
|
||||
}, TaskCreationOptions.LongRunning).FireAndForget();
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user