summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-01-30 07:06:11 +0000
committerGitHub <noreply@github.com>2019-01-30 07:06:11 +0000
commit457fbfaf2213e6b63b8eaad3bf47fd1037679f31 (patch)
tree2b336b236577d1d2b968b067dd320e5f2d6e83a0 /synapse
parentMerge pull request #4515 from matrix-org/erikj/room_version_v3 (diff)
parentImplement workaround for login error. (diff)
downloadsynapse-457fbfaf2213e6b63b8eaad3bf47fd1037679f31.tar.xz
Merge pull request #4486 from xperimental/workaround-4216
Implement workaround for login error.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/util/logcontext.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/util/logcontext.py b/synapse/util/logcontext.py
index 4c6e92beb8..311b49e18a 100644
--- a/synapse/util/logcontext.py
+++ b/synapse/util/logcontext.py
@@ -285,7 +285,10 @@ class LoggingContext(object):
         self.alive = False
 
         # if we have a parent, pass our CPU usage stats on
-        if self.parent_context is not None:
+        if (
+            self.parent_context is not None
+            and hasattr(self.parent_context, '_resource_usage')
+        ):
             self.parent_context._resource_usage += self._resource_usage
 
             # reset them in case we get entered again