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

Commit

Permalink
Correctly register shutdown handler for presence workers (#11518)
Browse files Browse the repository at this point in the history
Fixes #11517
  • Loading branch information
David Robertson authored Dec 7, 2021
1 parent eccc49d commit 2a3ec6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/11518.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a regression in Synapse 1.48.0 where presence workers would not clear their presence updates over replication on shutdown.
2 changes: 1 addition & 1 deletion synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def __init__(self, hs: "HomeServer"):
self._on_shutdown,
)

def _on_shutdown(self) -> None:
async def _on_shutdown(self) -> None:
if self._presence_enabled:
self.hs.get_tcp_replication().send_command(
ClearUserSyncsCommand(self.instance_id)
Expand Down

0 comments on commit 2a3ec6f

Please sign in to comment.