diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-11-01 21:31:46 +1100 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-11-01 21:31:46 +1100 |
commit | 907e6da5be20523bd1d0a14c196289a73182aa65 (patch) | |
tree | 30e700dadabd415c169c3850aaf73aef817ef7e2 /synapse/federation/transaction_queue.py | |
parent | Merge pull request #4072 from steamp0rt/patch-1 (diff) | |
parent | changelog (diff) | |
download | synapse-907e6da5be20523bd1d0a14c196289a73182aa65.tar.xz |
Merge branch 'release-v0.33.8'
Diffstat (limited to 'synapse/federation/transaction_queue.py')
-rw-r--r-- | synapse/federation/transaction_queue.py | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py index 98b5950800..3fdd63be95 100644 --- a/synapse/federation/transaction_queue.py +++ b/synapse/federation/transaction_queue.py @@ -633,14 +633,6 @@ class TransactionQueue(object): transaction, json_data_cb ) code = 200 - - if response: - for e_id, r in response.get("pdus", {}).items(): - if "error" in r: - logger.warn( - "Transaction returned error for %s: %s", - e_id, r, - ) except HttpResponseException as e: code = e.code response = e.response @@ -657,19 +649,24 @@ class TransactionQueue(object): destination, txn_id, code ) - logger.debug("TX [%s] Sent transaction", destination) - logger.debug("TX [%s] Marking as delivered...", destination) - yield self.transaction_actions.delivered( transaction, code, response ) - logger.debug("TX [%s] Marked as delivered", destination) + logger.debug("TX [%s] {%s} Marked as delivered", destination, txn_id) - if code != 200: + if code == 200: + for e_id, r in response.get("pdus", {}).items(): + if "error" in r: + logger.warn( + "TX [%s] {%s} Remote returned error for %s: %s", + destination, txn_id, e_id, r, + ) + else: for p in pdus: - logger.info( - "Failed to send event %s to %s", p.event_id, destination + logger.warn( + "TX [%s] {%s} Failed to send event %s", + destination, txn_id, p.event_id, ) success = False |