Merge pull request #971 from matrix-org/erikj/fed_state

Fix response cache
This commit is contained in:
Erik Johnston 2016-08-02 17:07:32 +01:00 committed by GitHub
commit 06f812b95c
1 changed files with 3 additions and 3 deletions

View File

@ -205,7 +205,7 @@ class FederationServer(FederationBase):
result = self._state_resp_cache.get((room_id, event_id)) result = self._state_resp_cache.get((room_id, event_id))
if not result: if not result:
with (yield self._server_linearizer.queue((origin, room_id))): with (yield self._server_linearizer.queue((origin, room_id))):
resp = yield self.response_cache.set( resp = yield self._state_resp_cache.set(
(room_id, event_id), (room_id, event_id),
self._on_context_state_request_compute(room_id, event_id) self._on_context_state_request_compute(room_id, event_id)
) )
@ -235,10 +235,10 @@ class FederationServer(FederationBase):
) )
) )
defer.returnValue((200, { defer.returnValue({
"pdus": [pdu.get_pdu_json() for pdu in pdus], "pdus": [pdu.get_pdu_json() for pdu in pdus],
"auth_chain": [pdu.get_pdu_json() for pdu in auth_chain], "auth_chain": [pdu.get_pdu_json() for pdu in auth_chain],
})) })
@defer.inlineCallbacks @defer.inlineCallbacks
@log_function @log_function