1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Pass through PREPARED state after error, when keepalive returns succes.

This is according to the state diagram in client.js.
This will show a spinner at the bottom of a room again
while the catchup sync is in progress,
which seems to have broken at some point.
This commit is contained in:
Bruno Windels
2018-08-28 14:54:54 +02:00
parent 60c01d7869
commit d72a70396a

View File

@@ -780,6 +780,13 @@ SyncApi.prototype._onSyncError = function(err, syncOptions) {
// instead, so that clients can observe this state
// if they wish.
this._startKeepAlives().then(() => {
if (this.getSyncState() == 'ERROR') {
this._updateSyncState("PREPARED", {
oldSyncToken: null,
nextSyncToken: null,
catchingUp: true,
});
}
this._sync(syncOptions);
});