diff --git a/SessionUtilitiesKit/Database/Storage.swift b/SessionUtilitiesKit/Database/Storage.swift index 0dd818c9c..fd1dd91e4 100644 --- a/SessionUtilitiesKit/Database/Storage.swift +++ b/SessionUtilitiesKit/Database/Storage.swift @@ -332,7 +332,11 @@ open class Storage { } }() - migrationCompleted(finalResult) + // Note: We need to dispatch this to the next run toop to prevent blocking if the callback + // performs subsequent database operations + DispatchQueue.global(qos: .userInitiated).async(using: dependencies) { + migrationCompleted(finalResult) + } } }