Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Implement workaround for login error. #4486

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4486.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Workaround for login error when using both LDAP and internal authentication.
5 changes: 4 additions & 1 deletion synapse/util/logcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ def __exit__(self, type, value, traceback):
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
Expand Down