Merge branch 'charlesmchen/profileSaveDeadlock' into hotfix/2.17.1

pull/1/head
Michael Kirk 8 years ago
commit 875297f1a3

@ -243,6 +243,7 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
OWSAssert([userProfile isEqual:userProfileCopy]); OWSAssert([userProfile isEqual:userProfileCopy]);
} }
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Make sure to save on the local db connection for consistency. // Make sure to save on the local db connection for consistency.
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[userProfileCopy saveWithTransaction:transaction]; [userProfileCopy saveWithTransaction:transaction];
@ -280,6 +281,7 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
}]; }];
} }
}); });
});
} }
- (void)ensureLocalProfileCached - (void)ensureLocalProfileCached

Loading…
Cancel
Save