summary refs log tree commit diff
path: root/synapse/rest/media/v1/_base.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-08 17:05:01 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-08 17:05:01 +0100
commit23b50d6fb881db23324cac9f64cba33a1d3747b3 (patch)
tree160ac2f45363782b0bbc77dc845f410b18585199 /synapse/rest/media/v1/_base.py
parentAdd `xyz.amorgan.knock` /versions string (diff)
parentMerge tag 'v1.21.0rc3' into develop (diff)
downloadsynapse-23b50d6fb881db23324cac9f64cba33a1d3747b3.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into soru/knock
Diffstat (limited to 'synapse/rest/media/v1/_base.py')
-rw-r--r--synapse/rest/media/v1/_base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/_base.py b/synapse/rest/media/v1/_base.py
index 6568e61829..67aa993f19 100644
--- a/synapse/rest/media/v1/_base.py
+++ b/synapse/rest/media/v1/_base.py
@@ -213,6 +213,12 @@ async def respond_with_responder(
         file_size (int|None): Size in bytes of the media. If not known it should be None
         upload_name (str|None): The name of the requested file, if any.
     """
+    if request._disconnected:
+        logger.warning(
+            "Not sending response to request %s, already disconnected.", request
+        )
+        return
+
     if not responder:
         respond_404(request)
         return