Skip to content

Commit

Permalink
WIP: try to fix sync errors not being displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Jan 9, 2024
1 parent 878a587 commit 5980916
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Monal/Classes/HelperTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,10 @@ +(void) updateSyncErrorsWithDeleteOnly:(BOOL) removeOnly andWaitForCompletion:(B
{
//ignore already disconnected accounts (they are always "idle" but this does not reflect the real sync state)
if(account.accountState < kStateReconnecting && !account.reconnectInProgress)
{
DDLogDebug(@"Ignoring disconnected account: %@", account);
continue;
}
NSString* syncErrorIdentifier = [NSString stringWithFormat:@"syncError::%@", account.connectionProperties.identity.jid];
//dispatching this to the receive queue isn't neccessary anymore, see comments in account.idle
if(account.idle)
Expand Down Expand Up @@ -1405,6 +1408,7 @@ +(void) updateSyncErrorsWithDeleteOnly:(BOOL) removeOnly andWaitForCompletion:(B
if(![self isAppExtension] && !account.isDoingFullReconnect && ![account shouldTriggerSyncErrorForImportantUnackedOutgoingStanzas])
{
DDLogWarn(@"NOT posting syncError notification for %@ (we are not in the appex, no important stanzas are unacked and we are not doing a full reconnect)...", account.connectionProperties.identity.jid);
DDLogDebug(@"[self isAppExtension] == %@, account.isDoingFullReconnect == %@, [account shouldTriggerSyncErrorForImportantUnackedOutgoingStanzas] == %@", bool2str([self isAppExtension]), bool2str(account.isDoingFullReconnect), bool2str([account shouldTriggerSyncErrorForImportantUnackedOutgoingStanzas]));
continue;
}
DDLogWarn(@"Posting syncError notification for %@...", account.connectionProperties.identity.jid);
Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/xmpp.m
Original file line number Diff line number Diff line change
Expand Up @@ -5180,7 +5180,7 @@ -(void) logCatchupStats
-(void) handleFinishedCatchup
{
self->_catchupDone = YES;
self.isDoingFullReconnect = NO;
self.isDoingFullReconnect = !self.connectionProperties.supportsSM3;

//log catchup statistics
[self logCatchupStats];
Expand Down

0 comments on commit 5980916

Please sign in to comment.