diff options
author | Erik Johnston <erik@matrix.org> | 2015-09-11 11:51:25 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-09-17 10:21:32 +0100 |
commit | ffe8cf7e59bab7c9da98534f27b1e486cb642223 (patch) | |
tree | 6ffb7a9a1e10b8f4c4da2ce22bf1699e35378580 | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-ffe8cf7e59bab7c9da98534f27b1e486cb642223.tar.xz |
Fix bug where we sometimes didn't fetch all the keys requested for a
server.
-rw-r--r-- | synapse/crypto/keyring.py | 7 |
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()) |