mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
sync can also stop without an error
This commit is contained in:
parent
ba38ce7976
commit
d414fb6b94
@ -241,13 +241,13 @@ export class SessionContainer {
|
|||||||
// keep waiting if there is a ConnectionError
|
// keep waiting if there is a ConnectionError
|
||||||
// as the reconnector above will call
|
// as the reconnector above will call
|
||||||
// sync.start again to retry in this case
|
// sync.start again to retry in this case
|
||||||
return this._sync.error.name !== "ConnectionError";
|
return this._sync.error?.name !== "ConnectionError";
|
||||||
}
|
}
|
||||||
return s === SyncStatus.Syncing;
|
return s === SyncStatus.Syncing;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await this._waitForFirstSyncHandle.promise;
|
await this._waitForFirstSyncHandle.promise;
|
||||||
if (this._sync.status.get() === SyncStatus.Stopped) {
|
if (this._sync.status.get() === SyncStatus.Stopped && this._sync.error) {
|
||||||
throw this._sync.error;
|
throw this._sync.error;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user