summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-08 16:27:36 +0100
committerErik Johnston <erik@matrix.org>2015-05-08 16:28:08 +0100
commitfca28d243e520dc3f8bae919182120c4757d575c (patch)
tree8ad6b2e52972dbdd3a67f9f3cc8f67e931c31880 /synapse/crypto
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-fca28d243e520dc3f8bae919182120c4757d575c.tar.xz
Change the way we create observers to deferreds so that we don't get spammed by 'unhandled errors'
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/keyring.py8
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