mirror of
https://github.com/ppy/osu
synced 2025-02-20 04:17:06 +00:00
Fix PerformWrite
not rolling back transaction on exception
This commit is contained in:
parent
0abb400f64
commit
78d86fd3ff
@ -104,9 +104,12 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
PerformRead(t =>
|
PerformRead(t =>
|
||||||
{
|
{
|
||||||
var transaction = t.Realm.BeginWrite();
|
using (var transaction = t.Realm.BeginWrite())
|
||||||
perform(t);
|
{
|
||||||
transaction.Commit();
|
perform(t);
|
||||||
|
transaction.Commit();
|
||||||
|
}
|
||||||
|
|
||||||
RealmLiveStatistics.WRITES.Value++;
|
RealmLiveStatistics.WRITES.Value++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user