diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-02-12 13:46:59 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-02-12 13:46:59 +0000 |
commit | 58c9f206929560044fccae84c36fdd89724ccfc0 (patch) | |
tree | 1fc9e3c4ba992e6c35efb68dc9a62a7fa021295a /synapse/rest/media/v0 | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-58c9f206929560044fccae84c36fdd89724ccfc0.tar.xz |
Catch the exceptions thrown by twisted when you write to a closed connection
Diffstat (limited to 'synapse/rest/media/v0')
-rw-r--r-- | synapse/rest/media/v0/content_repository.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v0/content_repository.py b/synapse/rest/media/v0/content_repository.py index dcf3eaee1f..d9fc045fc6 100644 --- a/synapse/rest/media/v0/content_repository.py +++ b/synapse/rest/media/v0/content_repository.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.http.server import respond_with_json_bytes +from synapse.http.server import respond_with_json_bytes, finish_request from synapse.util.stringutils import random_string from synapse.api.errors import ( @@ -144,7 +144,7 @@ class ContentRepoResource(resource.Resource): # after the file has been sent, clean up and finish the request def cbFinished(ignored): f.close() - request.finish() + finish_request(request) d.addCallback(cbFinished) else: respond_with_json_bytes( |