From 14d29b1bd33a73a8e9309310b7b3550b2e44f7d4 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 12 Jul 2023 15:44:08 +0200 Subject: [PATCH] fix(sync): Clear pending autosync calls on close This would normally happen in the save call before closing. However if that call fails (for example due to a conflict) we still clear the pending autosync calls to prevent 403s. Fixes #4080. Signed-off-by: Max --- src/services/SyncService.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/SyncService.js b/src/services/SyncService.js index ee1f2e772a3..a2eb814012d 100644 --- a/src/services/SyncService.js +++ b/src/services/SyncService.js @@ -284,6 +284,8 @@ class SyncService { } async close() { + // Make sure to leave no pending requests behind. + this.autosave.clear() this.backend?.disconnect() return this._close() }