1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-06 02:33:20 +08:00

Fix threaded realm usage not disposing context fast enough

This commit is contained in:
Dean Herbert 2021-10-15 16:39:53 +09:00
parent 34d60b9e10
commit 8fb9aec730

View File

@ -59,7 +59,12 @@ namespace osu.Game.Rulesets.Configuration
pendingWrites.Clear();
}
realmFactory?.CreateContext().Write(realm =>
if (realmFactory == null)
return true;
using (var context = realmFactory.CreateContext())
{
context.Write(realm =>
{
foreach (var c in changed)
{
@ -68,6 +73,7 @@ namespace osu.Game.Rulesets.Configuration
setting.Value = ConfigStore[c].ToString();
}
});
}
return true;
}