mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Fix exceptions when a connection is closed before we read the headers
This fixes bugs introduced in #3700, by making sure that we behave sanely when an incoming connection is closed before the headers are read.
This commit is contained in:
parent
55e6bdf287
commit
be6527325a
2 changed files with 10 additions and 2 deletions
|
@ -402,7 +402,9 @@ class PreserveLoggingContext(object):
|
|||
|
||||
__slots__ = ["current_context", "new_context", "has_parent"]
|
||||
|
||||
def __init__(self, new_context=LoggingContext.sentinel):
|
||||
def __init__(self, new_context=None):
|
||||
if new_context is None:
|
||||
new_context = LoggingContext.sentinel
|
||||
self.new_context = new_context
|
||||
|
||||
def __enter__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue