mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-11 13:14:20 -05:00
Don't log stack trace when client has gone away during media download (#4738)
* Don't log stack trace when client has gone away during media download * Newsfile * Fixup newsfile
This commit is contained in:
parent
641c409e4e
commit
899a119c2b
1
changelog.d/4738.misc
Normal file
1
changelog.d/4738.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Cleanup request exception logging.
|
@ -133,8 +133,15 @@ def respond_with_responder(request, responder, media_type, file_size, upload_nam
|
|||||||
|
|
||||||
logger.debug("Responding to media request with responder %s")
|
logger.debug("Responding to media request with responder %s")
|
||||||
add_file_headers(request, media_type, file_size, upload_name)
|
add_file_headers(request, media_type, file_size, upload_name)
|
||||||
with responder:
|
try:
|
||||||
yield responder.write_to_consumer(request)
|
with responder:
|
||||||
|
yield responder.write_to_consumer(request)
|
||||||
|
except Exception as e:
|
||||||
|
# The majority of the time this will be due to the client having gone
|
||||||
|
# away. Unfortunately, Twisted simply throws a generic exception at us
|
||||||
|
# in that case.
|
||||||
|
logger.warning("Failed to write to consumer: %s %s", type(e), e)
|
||||||
|
|
||||||
finish_request(request)
|
finish_request(request)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user