mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:05:03 -04:00
Catch the exceptions thrown by twisted when you write to a closed connection
This commit is contained in:
parent
ec0f3836ff
commit
58c9f20692
5 changed files with 33 additions and 11 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue