summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/sqlcipher.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py
index 46ceca42..38d5e7ec 100644
--- a/client/src/leap/soledad/client/sqlcipher.py
+++ b/client/src/leap/soledad/client/sqlcipher.py
@@ -480,13 +480,11 @@ class SQLCipherDatabase(sqlite_backend.SQLitePartialExpandDatabase):
@property
def syncing(self):
- syncing = False
- for url in self._syncers:
- _, _, lock = self._syncers[url]
- is_not_locked = lock.acquire(blocking=False)
- if is_not_locked is False:
- return True
- lock.release()
+ lock = SQLCipherDatabase.syncing_lock[self._get_replica_uid()]
+ acquired_lock = lock.acquire(False)
+ if acquired_lock is False:
+ return True
+ lock.release()
return False
def _get_syncer(self, url, creds=None):