1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 22:22:54 +08:00

Fix PerformWrite not rolling back transaction on exception

This commit is contained in:
Dean Herbert 2022-06-30 15:11:22 +09:00
parent 0abb400f64
commit 78d86fd3ff

View File

@ -104,9 +104,12 @@ namespace osu.Game.Database
PerformRead(t =>
{
var transaction = t.Realm.BeginWrite();
perform(t);
transaction.Commit();
using (var transaction = t.Realm.BeginWrite())
{
perform(t);
transaction.Commit();
}
RealmLiveStatistics.WRITES.Value++;
});
}