diff --git a/MatrixSDK/MXSession.m b/MatrixSDK/MXSession.m index 1a5494ee3b..e638af8fb0 100644 --- a/MatrixSDK/MXSession.m +++ b/MatrixSDK/MXSession.m @@ -2084,7 +2084,7 @@ - (BOOL)hasAnyBackgroundCachedSyncResponses - (void)handleBackgroundSyncCacheIfRequiredWithCompletion:(void (^)(void))completion { - BOOL isInValidState = _state == MXSessionStateStoreDataReady || _state == MXSessionStatePaused; + BOOL isInValidState = _state == MXSessionStateStoreDataReady || _state == MXSessionStatePaused || _state == MXSessionStatePauseRequested; if (!isInValidState) { NSString *message = [NSString stringWithFormat:@"[MXSession] handleBackgroundSyncCacheIfRequired: state %@ is not valid to handle background sync cache, investigate why the method was called", [MXTools readableSessionState:_state]]; MXLogFailure(message);