Recover after a sync failure
This MR fixes a bug where the Matrix.Session
does not recover from a failed sync. For example, when the screen locks or the user switches to a different app while we're waiting on a sync, we never get the sync response and it looks (to the app) like a timeout.
The fix is to remember to set the syncRequestTask
to nil
when these errors occur. Then we are able to start over again and recover once the app has regained focus.