Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Closed
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
7 changes: 4 additions & 3 deletions synapse/rest/media/v1/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,14 @@ def respond_with_responder(request, responder, media_type, file_size, upload_nam
try:
with responder:
yield responder.write_to_consumer(request)

finish_request(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)
if str(e) != "Consumer asked us to stop producing":
logger.warning("Failed to write to consumer: %s %s", type(e), e)


class Responder(object):
Expand Down