forked from mystiq/hydrogen-web
retry sync on timeout, even for incremental sync
This commit is contained in:
parent
7f0d36cf79
commit
bcca23bac9
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,11 @@ export class Sync {
|
|||
this._status.set(SyncStatus.Syncing);
|
||||
}
|
||||
} catch (err) {
|
||||
// retry same request on timeout
|
||||
if (err.name === "ConnectionError" && err.isTimeout) {
|
||||
// don't run afterSyncCompleted
|
||||
continue;
|
||||
}
|
||||
this._status.set(SyncStatus.Stopped);
|
||||
if (err.name !== AbortError) {
|
||||
console.warn("stopping sync because of error");
|
||||
|
|
Loading…
Reference in a new issue