diff options
author | Erik Johnston <erik@matrix.org> | 2017-11-15 11:32:24 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-11-15 11:32:24 +0000 |
commit | 552f123bea1014680ab798b7e34cd1b23424a189 (patch) | |
tree | 71da1c70b084a38a032380f8976a0c4deef33d64 /synapse/federation/federation_server.py | |
parent | Merge pull request #2598 from matrix-org/revert-2596-erikj/attestation_jitter (diff) | |
parent | Bump changelog (diff) | |
download | synapse-552f123bea1014680ab798b7e34cd1b23424a189.tar.xz |
Merge branch 'release-v0.25.0' of github.com:matrix-org/synapse v0.25.0
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index e15228e70b..a2327f24b6 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -18,6 +18,7 @@ from .federation_base import FederationBase from .units import Transaction, Edu from synapse.util import async +from synapse.util.logcontext import make_deferred_yieldable, preserve_fn from synapse.util.logutils import log_function from synapse.util.caches.response_cache import ResponseCache from synapse.events import FrozenEvent @@ -253,12 +254,13 @@ class FederationServer(FederationBase): result = self._state_resp_cache.get((room_id, event_id)) if not result: with (yield self._server_linearizer.queue((origin, room_id))): - resp = yield self._state_resp_cache.set( + d = self._state_resp_cache.set( (room_id, event_id), - self._on_context_state_request_compute(room_id, event_id) + preserve_fn(self._on_context_state_request_compute)(room_id, event_id) ) + resp = yield make_deferred_yieldable(d) else: - resp = yield result + resp = yield make_deferred_yieldable(result) defer.returnValue((200, resp)) |