summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-14 13:58:52 +0000
committerErik Johnston <erik@matrix.org>2019-02-14 14:01:04 +0000
commit7fc1196a362fc56d11e2652ee5c9699b1198cf40 (patch)
treefac7a253674cb2039c82bcc2eb58fea8b6bc3881 /synapse/crypto
parentMerge pull request #4450 from 14mRh4X0r/fix-dependency-message (diff)
downloadsynapse-7fc1196a362fc56d11e2652ee5c9699b1198cf40.tar.xz
Correctly handle RequestSendFailed exceptions
This mainly reduces the number of exceptions we log.
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/keyring.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index 3a96980bed..cce40fdd2d 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -35,7 +35,7 @@ from unpaddedbase64 import decode_base64
 
 from twisted.internet import defer
 
-from synapse.api.errors import Codes, SynapseError
+from synapse.api.errors import Codes, RequestSendFailed, SynapseError
 from synapse.util import logcontext, unwrapFirstError
 from synapse.util.logcontext import (
     LoggingContext,
@@ -656,7 +656,7 @@ def _handle_key_deferred(verify_request):
     try:
         with PreserveLoggingContext():
             _, key_id, verify_key = yield verify_request.deferred
-    except IOError as e:
+    except (IOError, RequestSendFailed) as e:
         logger.warn(
             "Got IOError when downloading keys for %s: %s %s",
             server_name, type(e).__name__, str(e),