diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-12 15:31:26 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-12 15:31:26 +0100 |
commit | 4429e4bf2499b0b3fecc8637c2a7a932aab908e4 (patch) | |
tree | 0c17e1767434df9684c3d34263a161ba4fa1d9b9 /synapse/crypto/keyring.py | |
parent | Update the end_token correctly, otherwise the token doesn't advance and the c... (diff) | |
parent | Merge pull request #143 from matrix-org/erikj/SYN-375 (diff) | |
download | synapse-4429e4bf2499b0b3fecc8637c2a7a932aab908e4.tar.xz |
Merge branch 'develop' into notifier_unify
Conflicts: synapse/notifier.py
Diffstat (limited to 'synapse/crypto/keyring.py')
-rw-r--r-- | synapse/crypto/keyring.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 8709394b97..a859872ce2 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -26,7 +26,7 @@ from synapse.api.errors import SynapseError, Codes from synapse.util.retryutils import get_retry_limiter -from synapse.util.async import create_observer +from synapse.util.async import ObservableDeferred from OpenSSL import crypto @@ -111,6 +111,10 @@ class Keyring(object): if download is None: download = self._get_server_verify_key_impl(server_name, key_ids) + download = ObservableDeferred( + download, + consumeErrors=True + ) self.key_downloads[server_name] = download @download.addBoth @@ -118,7 +122,7 @@ class Keyring(object): del self.key_downloads[server_name] return ret - r = yield create_observer(download) + r = yield download.observe() defer.returnValue(r) @defer.inlineCallbacks |