mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Catch AttributeErrors when calling registerProducer (#10995)
Looks like the wrong exception type was caught in #10932.
This commit is contained in:
parent
f563676c09
commit
52aefd5086
2 changed files with 5 additions and 1 deletions
|
@ -563,7 +563,10 @@ class _ByteProducer:
|
|||
|
||||
try:
|
||||
self._request.registerProducer(self, True)
|
||||
except RuntimeError as e:
|
||||
except AttributeError as e:
|
||||
# Calling self._request.registerProducer might raise an AttributeError since
|
||||
# the underlying Twisted code calls self._request.channel.registerProducer,
|
||||
# however self._request.channel will be None if the connection was lost.
|
||||
logger.info("Connection disconnected before response was written: %r", e)
|
||||
|
||||
# We drop our references to data we'll not use.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue