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

Commit

Permalink
Revert "Fix dropping locks on shut down"
Browse files Browse the repository at this point in the history
This reverts commit 83f1ccf.
  • Loading branch information
erikjohnston committed Jul 20, 2021
1 parent 83f1ccf commit 794371b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions synapse/storage/databases/main/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ async def _on_shutdown(self) -> None:
"""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")
Expand Down

0 comments on commit 794371b

Please sign in to comment.