Skip to content

Commit

Permalink
fix(NextcloudBookmarks): Make sure lock is freed when forceLock is set
Browse files Browse the repository at this point in the history
fixes #1857

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Feb 9, 2025
1 parent 7dcc7c8 commit 6788a63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/adapters/NextcloudBookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export default class NextcloudBookmarksAdapter implements Adapter, BulkImportRes

// if needLock -- we always need it
this.locked = await this.acquireLock()
if (!forceLock && !this.locked) {
if (forceLock) {
this.locked = true
} else if (!this.locked) {
throw new ResourceLockedError()
}
this.lockingInterval = setInterval(() => !this.ended && this.acquireLock(), LOCK_INTERVAL)
Expand Down

0 comments on commit 6788a63

Please sign in to comment.