From e9219743ffde95ac09d4f106bf375a9b52d77184 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 22 Jun 2017 18:14:21 -0400 Subject: [PATCH] Archive sessions on the 'session store' queue. // FREEBIE --- src/Messages/OWSIdentityManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Messages/OWSIdentityManager.m b/src/Messages/OWSIdentityManager.m index 4ddae17d6..9949e3cfb 100644 --- a/src/Messages/OWSIdentityManager.m +++ b/src/Messages/OWSIdentityManager.m @@ -198,7 +198,9 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa createdAt:[NSDate new] verificationState:verificationState] save]; - [self.storageManager archiveAllSessionsForContact:recipientId]; + dispatch_async([OWSDispatch sessionStoreQueue], ^{ + [self.storageManager archiveAllSessionsForContact:recipientId]; + }); // Cancel any pending verification state sync messages for this recipient. [self clearSyncMessageForRecipientId:recipientId];