summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-10 14:04:13 +0000
committerErik Johnston <erik@matrix.org>2017-01-10 14:04:13 +0000
commitf477370c0cb5b3f6bee74eb2f8209f7fdf5db9fe (patch)
treeb7a4c294d1f02b0efa5c838d40f35a4e1c2c6cc9 /synapse/util
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-f477370c0cb5b3f6bee74eb2f8209f7fdf5db9fe.tar.xz
Add paranoia exception catch in Linearizer
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/async.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py
index 83875edc85..35380bf8ed 100644
--- a/synapse/util/async.py
+++ b/synapse/util/async.py
@@ -192,8 +192,11 @@ class Linearizer(object):
             logger.info(
                 "Waiting to acquire linearizer lock %r for key %r", self.name, key
             )
-            with PreserveLoggingContext():
-                yield current_defer
+            try:
+                with PreserveLoggingContext():
+                    yield current_defer
+            except:
+                logger.exception("Unexpected exception in Linearizer")
 
         logger.info("Acquired linearizer lock %r for key %r", self.name, key)