mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
If we're yielding don't add errback
This commit is contained in:
parent
23d9bd1d74
commit
29481690c5
@ -117,16 +117,12 @@ class FederationServer(FederationBase):
|
|||||||
for pdu in pdu_list:
|
for pdu in pdu_list:
|
||||||
d = self._handle_new_pdu(transaction.origin, pdu)
|
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:
|
try:
|
||||||
yield d
|
yield d
|
||||||
results.append({})
|
results.append({})
|
||||||
|
except FederationError as e:
|
||||||
|
self.send_failure(e, transaction.origin)
|
||||||
|
results.append({"error": str(e)})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
results.append({"error": str(e)})
|
results.append({"error": str(e)})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user