Don't always hit get_server_verify_key_v1_direct

pull/4/merge
Erik Johnston 10 years ago
parent 118a760719
commit 5ae4a84211
  1. 15
      synapse/crypto/keyring.py

@ -164,12 +164,17 @@ class Keyring(object):
keys = yield self.get_server_verify_key_v2_direct(
server_name, key_ids
)
except:
pass
except Exception as e:
logging.info(
"Unable to getting key %r for %r directly: %s %s",
key_ids, server_name,
type(e).__name__, str(e.message),
)
keys = yield self.get_server_verify_key_v1_direct(
server_name, key_ids
)
if keys is None:
keys = yield self.get_server_verify_key_v1_direct(
server_name, key_ids
)
for key_id in key_ids:
if key_id in keys:

Loading…
Cancel
Save