mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
retry sync on timeout, even for incremental sync
This commit is contained in:
parent
7f0d36cf79
commit
bcca23bac9
@ -119,6 +119,11 @@ export class Sync {
|
|||||||
this._status.set(SyncStatus.Syncing);
|
this._status.set(SyncStatus.Syncing);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
// retry same request on timeout
|
||||||
|
if (err.name === "ConnectionError" && err.isTimeout) {
|
||||||
|
// don't run afterSyncCompleted
|
||||||
|
continue;
|
||||||
|
}
|
||||||
this._status.set(SyncStatus.Stopped);
|
this._status.set(SyncStatus.Stopped);
|
||||||
if (err.name !== AbortError) {
|
if (err.name !== AbortError) {
|
||||||
console.warn("stopping sync because of error");
|
console.warn("stopping sync because of error");
|
||||||
|
Loading…
Reference in New Issue
Block a user