summary refs log tree commit diff
path: root/synapse/crypto/keyring.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-09-23 09:22:01 +0100
committerErik Johnston <erik@matrix.org>2015-09-23 09:22:01 +0100
commitd2fc591619abb40823f327e6eeab2e2547fa721b (patch)
tree1af7bf8a7aa8ffb7eb13d2d421c5a47a0aa28a3c /synapse/crypto/keyring.py
parentMerge pull request #271 from matrix-org/erikj/default_history (diff)
parentFix bug where we sometimes didn't fetch all the keys requested for a (diff)
downloadsynapse-d2fc591619abb40823f327e6eeab2e2547fa721b.tar.xz
Merge pull request #282 from matrix-org/erikj/missing_keys
Fix bug where we sometimes didn't fetch all the keys requested for a server.
Diffstat (limited to 'synapse/crypto/keyring.py')
-rw-r--r--synapse/crypto/keyring.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index 1b1b31c5c0..8b6a59866f 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -228,10 +228,9 @@ class Keyring(object):
         def do_iterations():
             merged_results = {}
 
-            missing_keys = {
-                group.server_name: set(group.key_ids)
-                for group in group_id_to_group.values()
-            }
+            missing_keys = {}
+            for group in group_id_to_group.values():
+                missing_keys.setdefault(group.server_name, set()).union(group.key_ids)
 
             for fn in key_fetch_fns:
                 results = yield fn(missing_keys.items())