diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index 4da24ba6..5587d2b0 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -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 + } } } }