diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-09-19 23:25:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 23:25:44 +0100 |
commit | 9864efa5321ad5afa522d9ecb3eb48e1f50fb852 (patch) | |
tree | 56995203bd7f98098243ab4a54eaccf6f9644292 /synapse | |
parent | Add a config option to block all room invites (#2457) (diff) | |
download | synapse-9864efa5321ad5afa522d9ecb3eb48e1f50fb852.tar.xz |
Fix concurrent server_key requests (#2458)
Fix a bug where we could end up firing off multiple requests for server_keys for the same server at the same time.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/crypto/keyring.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 51851d04e5..ebf4e2e7a6 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -201,7 +201,9 @@ class Keyring(object): server_name = verify_request.server_name request_id = id(verify_request) server_to_request_ids.setdefault(server_name, set()).add(request_id) - deferred.addBoth(remove_deferreds, server_name, verify_request) + verify_request.deferred.addBoth( + remove_deferreds, server_name, verify_request, + ) # Pass those keys to handle_key_deferred so that the json object # signatures can be verified |