summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-03-15 12:16:55 +0000
committerRichard van der Hoff <richard@matrix.org>2017-03-15 12:16:55 +0000
commit29ed09e80a8c7ddeebe3f257a336e4c387a06c88 (patch)
tree9fb244c8c00d9d01cd0856f0efc028caf53f4688 /synapse/federation
parentMerge pull request #2008 from matrix-org/erikj/notifier_stats (diff)
downloadsynapse-29ed09e80a8c7ddeebe3f257a336e4c387a06c88.tar.xz
Fix assertion to stop transaction queue getting wedged
... and update some docstrings to correctly reflect the types being used.

get_new_device_msgs_for_remote can return a long under some circumstances,
which was being stored in last_device_list_stream_id_by_dest, and was then
upsetting things on the next loop.
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/transaction_queue.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py
index 90235ff098..c802dd67a3 100644
--- a/synapse/federation/transaction_queue.py
+++ b/synapse/federation/transaction_queue.py
@@ -99,7 +99,12 @@ class TransactionQueue(object):
         # destination -> list of tuple(failure, deferred)
         self.pending_failures_by_dest = {}
 
+        # destination -> stream_id of last successfully sent to-device message.
+        # NB: may be a long or an int.
         self.last_device_stream_id_by_dest = {}
+
+        # destination -> stream_id of last successfully sent device list
+        # update.
         self.last_device_list_stream_id_by_dest = {}
 
         # HACK to get unique tx id