diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-04-30 01:02:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 01:02:25 +0100 |
commit | db75c86e8463b130d4dcd84e79c1ebee616f9689 (patch) | |
tree | b7c0c3e9262f8ca27470a0151cb5109472da20fa /synapse/handlers/typing.py | |
parent | Move more xrange to six (diff) | |
parent | Merge pull request #3085 from NotAFile/py3-config-text-mode (diff) | |
download | synapse-db75c86e8463b130d4dcd84e79c1ebee616f9689.tar.xz |
Merge branch 'develop' into py3-xrange-1
Diffstat (limited to 'synapse/handlers/typing.py')
-rw-r--r-- | synapse/handlers/typing.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 823e2e27e1..5d9736e88f 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -16,7 +16,7 @@ from twisted.internet import defer from synapse.api.errors import SynapseError, AuthError -from synapse.util.logcontext import preserve_fn +from synapse.util.logcontext import run_in_background from synapse.util.metrics import Measure from synapse.util.wheel_timer import WheelTimer from synapse.types import UserID, get_domain_from_id @@ -97,7 +97,8 @@ class TypingHandler(object): if self.hs.is_mine_id(member.user_id): last_fed_poke = self._member_last_federation_poke.get(member, None) if not last_fed_poke or last_fed_poke + FEDERATION_PING_INTERVAL <= now: - preserve_fn(self._push_remote)( + run_in_background( + self._push_remote, member=member, typing=True ) @@ -196,7 +197,7 @@ class TypingHandler(object): def _push_update(self, member, typing): if self.hs.is_mine_id(member.user_id): # Only send updates for changes to our own users. - preserve_fn(self._push_remote)(member, typing) + run_in_background(self._push_remote, member, typing) self._push_update_local( member=member, |