summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/federation/transaction_queue.py40
-rw-r--r--synapse/http/matrixfederationclient.py2
-rw-r--r--synapse/util/retryutils.py2
4 files changed, 29 insertions, 17 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index 792b8089f6..a804a25748 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -16,4 +16,4 @@
 """ This is a reference implementation of a Matrix home server.
 """
 
-__version__ = "0.7.0f"
+__version__ = "0.7.1"
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py
index 4b5460c797..7d30c924d1 100644
--- a/synapse/federation/transaction_queue.py
+++ b/synapse/federation/transaction_queue.py
@@ -111,14 +111,17 @@ class TransactionQueue(object):
                 (pdu, deferred, order)
             )
 
-            def eb(failure):
+            def chain(failure):
                 if not deferred.called:
                     deferred.errback(failure)
-                else:
-                    logger.warn("Failed to send pdu", failure.value)
+
+            def log_failure(failure):
+                logger.warn("Failed to send pdu", failure.value)
+
+            deferred.addErrback(log_failure)
 
             with PreserveLoggingContext():
-                self._attempt_new_transaction(destination).addErrback(eb)
+                self._attempt_new_transaction(destination).addErrback(chain)
 
             deferreds.append(deferred)
 
@@ -136,19 +139,25 @@ class TransactionQueue(object):
             (edu, deferred)
         )
 
-        def eb(failure):
+        def chain(failure):
             if not deferred.called:
                 deferred.errback(failure)
-            else:
-                logger.warn("Failed to send edu", failure.value)
+
+        def log_failure(failure):
+            logger.warn("Failed to send pdu", failure.value)
+
+        deferred.addErrback(log_failure)
 
         with PreserveLoggingContext():
-            self._attempt_new_transaction(destination).addErrback(eb)
+            self._attempt_new_transaction(destination).addErrback(chain)
 
         return deferred
 
     @defer.inlineCallbacks
     def enqueue_failure(self, failure, destination):
+        if destination == self.server_name or destination == "localhost":
+            return
+
         deferred = defer.Deferred()
 
         if not self.can_send_to(destination):
@@ -160,14 +169,17 @@ class TransactionQueue(object):
             (failure, deferred)
         )
 
-        def eb(failure):
+        def chain(f):
             if not deferred.called:
-                deferred.errback(failure)
-            else:
-                logger.warn("Failed to send failure", failure.value)
+                deferred.errback(f)
+
+        def log_failure(f):
+            logger.warn("Failed to send pdu", f.value)
+
+        deferred.addErrback(log_failure)
 
         with PreserveLoggingContext():
-            self._attempt_new_transaction(destination).addErrback(eb)
+            self._attempt_new_transaction(destination).addErrback(chain)
 
         yield deferred
 
@@ -329,7 +341,7 @@ class TransactionQueue(object):
         except Exception as e:
             # We capture this here as there as nothing actually listens
             # for this finishing functions deferred.
-            logger.exception(
+            logger.warn(
                 "TX [%s] Problem in _attempt_transaction: %s",
                 destination,
                 e,
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 49a4c7d9d3..fe57363388 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -144,7 +144,7 @@ class MatrixFederationHttpClient(object):
                         destination,
                         e
                     )
-                    raise SynapseError(400, "Domain specified not found.")
+                    raise
 
                 logger.warn(
                     "Sending request failed to %s: %s %s: %s - %s",
diff --git a/synapse/util/retryutils.py b/synapse/util/retryutils.py
index ac30545079..4e82232796 100644
--- a/synapse/util/retryutils.py
+++ b/synapse/util/retryutils.py
@@ -146,7 +146,7 @@ class RetryDestinationLimiter(object):
             else:
                 self.retry_interval = self.min_retry_interval
 
-            retry_last_ts = int(self.clock.time_msec()),
+            retry_last_ts = int(self.clock.time_msec())
 
         self.store.set_destination_retry_timings(
             self.destination, retry_last_ts, self.retry_interval