diff --git a/v2rayN/ServiceLib/Helper/SqliteHelper.cs b/v2rayN/ServiceLib/Helper/SqliteHelper.cs index 1561d3a5..959d5ff6 100644 --- a/v2rayN/ServiceLib/Helper/SqliteHelper.cs +++ b/v2rayN/ServiceLib/Helper/SqliteHelper.cs @@ -26,7 +26,7 @@ public sealed class SQLiteHelper public async Task InsertAllAsync(IEnumerable models) { - return await _dbAsync.InsertAllAsync(models); + return await _dbAsync.InsertAllAsync(models, runInTransaction: true).ConfigureAwait(false); } public async Task InsertAsync(object model) @@ -46,7 +46,7 @@ public sealed class SQLiteHelper public async Task UpdateAllAsync(IEnumerable models) { - return await _dbAsync.UpdateAllAsync(models); + return await _dbAsync.UpdateAllAsync(models, runInTransaction: true).ConfigureAwait(false); } public async Task DeleteAsync(object model)