mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Merge pull request #7115 from vector-im/andy/mandatory_crypto
Do not retry initial sync on fatal errors
This commit is contained in:
@@ -890,6 +890,9 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self->mxSession = nil;
|
||||
|
||||
NSString *myUserId = self.mxSession.myUser.userId;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification object:error userInfo:myUserId ? @{kMXKErrorUserIdKey: myUserId} : nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self->sessionStateObserver];
|
||||
self->sessionStateObserver = nil;
|
||||
|
||||
@@ -1677,6 +1680,14 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
|
||||
NSString *myUserId = self.mxSession.myUser.userId;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification object:error userInfo:myUserId ? @{kMXKErrorUserIdKey: myUserId} : nil];
|
||||
}
|
||||
|
||||
// If we cannot resolve this error by retrying, exit early
|
||||
BOOL isRetryableError = [error.domain isEqualToString:NSURLErrorDomain] || [MXHTTPOperation urlResponseFromError:error] != nil;
|
||||
if (!isRetryableError)
|
||||
{
|
||||
MXLogDebug(@"[MXKAccount] Initial sync will not be retried");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if it is a network connectivity issue
|
||||
AFNetworkReachabilityManager *networkReachabilityManager = [AFNetworkReachabilityManager sharedManager];
|
||||
|
||||
Reference in New Issue
Block a user