Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 794371b

Browse files
committed
Revert "Fix dropping locks on shut down"
This reverts commit 83f1ccf.
1 parent 83f1ccf commit 794371b

File tree

1 file changed

+1
-5
lines changed
  • synapse/storage/databases/main

1 file changed

+1
-5
lines changed

synapse/storage/databases/main/lock.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ async def _on_shutdown(self) -> None:
7878
"""Called when the server is shutting down"""
7979
logger.info("Dropping held locks due to shutdown")
8080

81-
# We need to take a copy of the tokens dict as dropping the locks will
82-
# cause the dictionary to change.
83-
tokens = dict(self._live_tokens)
84-
85-
for (lock_name, lock_key), token in tokens.items():
81+
for (lock_name, lock_key), token in self._live_tokens.items():
8682
await self._drop_lock(lock_name, lock_key, token)
8783

8884
logger.info("Dropped locks due to shutdown")

0 commit comments

Comments
 (0)