Skip to content

Commit

Permalink
Desktop: Fixes #11594: Fix syncLockGoneError on sync with certain sha…
Browse files Browse the repository at this point in the history
…re configs (#11611)
  • Loading branch information
personalizedrefrigerator authored Jan 9, 2025
1 parent e1e2ba8 commit 597f318
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/lib/Synchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,10 @@ export default class Synchronizer {
const hasActiveExclusiveLock = await hasActiveLock(locks, currentDate, this.lockHandler().lockTtl, LockType.Exclusive);
if (hasActiveExclusiveLock) return 'hasExclusiveLock';

const hasActiveSyncLock = await hasActiveLock(locks, currentDate, this.lockHandler().lockTtl, LockType.Sync, this.lockClientType(), this.clientId_);
if (!hasActiveSyncLock) return 'syncLockGone';
if (this.lockHandler().enabled) {
const hasActiveSyncLock = await hasActiveLock(locks, currentDate, this.lockHandler().lockTtl, LockType.Sync, this.lockClientType(), this.clientId_);
if (!hasActiveSyncLock) return 'syncLockGone';
}

return '';
}
Expand Down

0 comments on commit 597f318

Please sign in to comment.