Do not retry initial sync on fatal errors

This commit is contained in:
Andy Uhnak
2022-11-29 10:11:41 +00:00
parent 0cb4e69f05
commit c28b57ae4a
2 changed files with 9 additions and 0 deletions
@@ -1677,6 +1677,14 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
NSString *myUserId = self.mxSession.myUser.userId;
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification object:error userInfo:myUserId ? @{kMXKErrorUserIdKey: myUserId} : nil];
}
// If we encounter a fatal sync issue, we do not re-attempt sync as we cannot recover
// from this problem, and the user needs to restart / re-install the app
NSSet *fatalSyncErrors = [NSSet setWithArray:@[MXCryptoErrorDomain]];
if ([fatalSyncErrors containsObject:error.domain])
{
return;
}
// Check if it is a network connectivity issue
AFNetworkReachabilityManager *networkReachabilityManager = [AFNetworkReachabilityManager sharedManager];