diff options
author | Erik Johnston <erik@matrix.org> | 2021-07-20 12:28:40 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-07-20 12:28:40 +0100 |
commit | 794371b1bf800353a7a4496dc6aeefb30c50831e (patch) | |
tree | f085bdf4ce5bc84a4748c23f27c5807735c662a1 | |
parent | Fix dropping locks on shut down (diff) | |
download | synapse-794371b1bf800353a7a4496dc6aeefb30c50831e.tar.xz |
Revert "Fix dropping locks on shut down"
This reverts commit 83f1ccfcaba76785ab4bd91e3177724e2dbb85ed.
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/databases/main/lock.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/lock.py b/synapse/storage/databases/main/lock.py index 3d1dff660b..774861074c 100644 --- a/synapse/storage/databases/main/lock.py +++ b/synapse/storage/databases/main/lock.py @@ -78,11 +78,7 @@ class LockStore(SQLBaseStore): """Called when the server is shutting down""" logger.info("Dropping held locks due to shutdown") - # We need to take a copy of the tokens dict as dropping the locks will - # cause the dictionary to change. - tokens = dict(self._live_tokens) - - for (lock_name, lock_key), token in tokens.items(): + for (lock_name, lock_key), token in self._live_tokens.items(): await self._drop_lock(lock_name, lock_key, token) logger.info("Dropped locks due to shutdown") |