Skip to content

Commit

Permalink
fix(sync): Clear pending autosync calls on close
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
max-nextcloud authored and juliusknorr committed Jul 12, 2023
1 parent 3b71af8 commit 14d29b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 14d29b1

Please sign in to comment.