From d759e1429f3f9a8bfc338ba090215f04a635c82d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 28 Sep 2020 16:06:19 +0200 Subject: [PATCH] set error before changing state to stopped --- src/matrix/Sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index cee8347d..14655b8e 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -124,12 +124,12 @@ export class Sync { // don't run afterSyncCompleted continue; } - this._status.set(SyncStatus.Stopped); if (err.name !== AbortError) { console.warn("stopping sync because of error"); console.error(err); this._error = err; } + this._status.set(SyncStatus.Stopped); } if (this._status.get() !== SyncStatus.Stopped) { // TODO: if we're not going to run this phase in parallel with the next