diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-02-12 14:29:36 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-02-12 14:29:36 +0000 |
commit | 66f9a49ce989cdd72fdbfd0acd88a3ee66ae04e1 (patch) | |
tree | 1fc9e3c4ba992e6c35efb68dc9a62a7fa021295a /synapse/rest/media/v1/base_resource.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
parent | Catch the exceptions thrown by twisted when you write to a closed connection (diff) | |
download | synapse-66f9a49ce989cdd72fdbfd0acd88a3ee66ae04e1.tar.xz |
Merge pull request #574 from matrix-org/markjh/connection_closed
Catch the exceptions thrown by twisted when you write to a closed con…
Diffstat (limited to 'synapse/rest/media/v1/base_resource.py')
-rw-r--r-- | synapse/rest/media/v1/base_resource.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/base_resource.py b/synapse/rest/media/v1/base_resource.py index 58d56ec7a4..58ef91c0b8 100644 --- a/synapse/rest/media/v1/base_resource.py +++ b/synapse/rest/media/v1/base_resource.py @@ -16,7 +16,7 @@ from .thumbnailer import Thumbnailer from synapse.http.matrixfederationclient import MatrixFederationHttpClient -from synapse.http.server import respond_with_json +from synapse.http.server import respond_with_json, finish_request from synapse.util.stringutils import random_string from synapse.api.errors import ( cs_error, Codes, SynapseError @@ -238,7 +238,7 @@ class BaseMediaResource(Resource): with open(file_path, "rb") as f: yield FileSender().beginFileTransfer(f, request) - request.finish() + finish_request(request) else: self._respond_404(request) |