summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-01-06 14:34:02 +0000
committerGitHub <noreply@github.com>2020-01-06 14:34:02 +0000
commitab4b4ee6a7e15d1d6e83c4b826051da7df7f83e3 (patch)
treec11ce5046000464c268143e796c3b8c80f0d207d
parentFix exception when fetching notary server's old keys (#6625) (diff)
downloadsynapse-ab4b4ee6a7e15d1d6e83c4b826051da7df7f83e3.tar.xz
Fix an error which was thrown by the PresenceHandler _on_shutdown handler. (#6640)
-rw-r--r--changelog.d/6640.bugfix1
-rw-r--r--synapse/handlers/presence.py9
2 files changed, 3 insertions, 7 deletions
diff --git a/changelog.d/6640.bugfix b/changelog.d/6640.bugfix
new file mode 100644
index 0000000000..8c2a129933
--- /dev/null
+++ b/changelog.d/6640.bugfix
@@ -0,0 +1 @@
+Fix an error which was thrown by the PresenceHandler _on_shutdown handler.
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 240c4add12..202aa9294f 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -95,12 +95,7 @@ assert LAST_ACTIVE_GRANULARITY < IDLE_TIMER
 
 
 class PresenceHandler(object):
-    def __init__(self, hs):
-        """
-
-        Args:
-            hs (synapse.server.HomeServer):
-        """
+    def __init__(self, hs: "synapse.server.HomeServer"):
         self.hs = hs
         self.is_mine = hs.is_mine
         self.is_mine_id = hs.is_mine_id
@@ -230,7 +225,7 @@ class PresenceHandler(object):
         is some spurious presence changes that will self-correct.
         """
         # If the DB pool has already terminated, don't try updating
-        if not self.store.database.is_running():
+        if not self.store.db.is_running():
             return
 
         logger.info(