mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
[PM-1646] Add thread safety to migration process (#2453)
* Make migration process thread safe * tweaks
This commit is contained in:
@@ -1537,11 +1537,8 @@ namespace Bit.Core.Services
|
||||
{
|
||||
if (!_migrationChecked)
|
||||
{
|
||||
var migrationService = ServiceContainer.Resolve<IStateMigrationService>("stateMigrationService");
|
||||
if (await migrationService.NeedsMigration())
|
||||
{
|
||||
await migrationService.Migrate();
|
||||
}
|
||||
var migrationService = ServiceContainer.Resolve<IStateMigrationService>();
|
||||
await migrationService.MigrateIfNeededAsync();
|
||||
_migrationChecked = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user