summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-07 11:51:28 +0100
committerErik Johnston <erik@matrix.org>2017-04-07 11:51:28 +0100
commitd4d176e5d0d130763a5379b317d3d3d039055ba4 (patch)
tree65b39e144ced99861c0049c58712babe57be7b30 /synapse
parentFix up federation SendQueue and document types (diff)
downloadsynapse-d4d176e5d0d130763a5379b317d3d3d039055ba4.tar.xz
Add logging
Diffstat (limited to '')
-rw-r--r--synapse/federation/send_queue.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/federation/send_queue.py b/synapse/federation/send_queue.py
index 8a6392c697..867cba0cf1 100644
--- a/synapse/federation/send_queue.py
+++ b/synapse/federation/send_queue.py
@@ -38,6 +38,10 @@ import synapse.metrics
 from blist import sorteddict
 from collections import namedtuple
 
+import logging
+
+logger = logging.getLogger(__name__)
+
 
 metrics = synapse.metrics.get_metrics_for(__name__)
 
@@ -480,6 +484,10 @@ def process_rows_for_federation(federation_sender, rows):
 
     # Parse the rows in the stream and add to the buffer
     for row in rows:
+        if row.type not in TypeToRow:
+            logger.error("Unrecognized federation row type %r", row.type)
+            continue
+
         RowType = TypeToRow[row.type]
         parsed_row = RowType.from_data(row.data)
         parsed_row.add_to_buffer(buff)