summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-01-10 15:38:30 +0000
committerGitHub <noreply@github.com>2017-01-10 15:38:30 +0000
commitd2b00d0866db833911f4db83afa50ec6f30c8994 (patch)
tree6dd1846bf11afffaea168c1ae1c81d26c3d8ed2a /synapse/util
parentMerge pull request #1791 from matrix-org/markjh/file_logging (diff)
parentAdd paranoia exception catch in Linearizer (diff)
downloadsynapse-d2b00d0866db833911f4db83afa50ec6f30c8994.tar.xz
Merge pull request #1790 from matrix-org/erikj/linearizer
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)