diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-02 11:50:43 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-02 11:50:43 +0000 |
commit | 29481690c5b296a1c8aee3068d32ef083ef227f3 (patch) | |
tree | 92fcbf0f0b5deed749a2afa51f5173ecb2d3caa2 /synapse/federation/federation_server.py | |
parent | Process transactions serially. (diff) | |
download | synapse-29481690c5b296a1c8aee3068d32ef083ef227f3.tar.xz |
If we're yielding don't add errback
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 7ee37fb34d..bc9bac809a 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -117,16 +117,12 @@ class FederationServer(FederationBase): for pdu in pdu_list: d = self._handle_new_pdu(transaction.origin, pdu) - def handle_failure(failure): - failure.trap(FederationError) - self.send_failure(failure.value, transaction.origin) - return failure - - d.addErrback(handle_failure) - try: yield d results.append({}) + except FederationError as e: + self.send_failure(e, transaction.origin) + results.append({"error": str(e)}) except Exception as e: results.append({"error": str(e)}) |