forked from mystiq/hydrogen-web
don't run afterSyncCompleted when there was an error
This commit is contained in:
parent
afb9ae4391
commit
09cb39b553
1 changed files with 7 additions and 5 deletions
|
@ -100,11 +100,13 @@ export class Sync {
|
|||
this._status.set(SyncStatus.Stopped);
|
||||
}
|
||||
}
|
||||
try {
|
||||
await this._session.afterSyncCompleted();
|
||||
} catch (err) {
|
||||
console.err("error during after sync completed, continuing to sync.", err.stack);
|
||||
// swallowing error here apart from logging
|
||||
if (!this._error) {
|
||||
try {
|
||||
await this._session.afterSyncCompleted();
|
||||
} catch (err) {
|
||||
console.err("error during after sync completed, continuing to sync.", err.stack);
|
||||
// swallowing error here apart from logging
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue