Fix an error which was thrown by the PresenceHandler _on_shutdown handler. (#6640)

This commit is contained in:
Richard van der Hoff 2020-01-06 14:34:02 +00:00 committed by GitHub
parent 4b36b482e0
commit ab4b4ee6a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

1
changelog.d/6640.bugfix Normal file
View File

@ -0,0 +1 @@
Fix an error which was thrown by the PresenceHandler _on_shutdown handler.

View File

@ -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(