summary refs log tree commit diff
path: root/synapse/http/client.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-05-25 10:23:00 +0100
committerErik Johnston <erik@matrix.org>2021-05-25 10:23:00 +0100
commit2d83d1906161ab7794ee41265ff49f3b3ff1c591 (patch)
tree8b7718387857071ed8c93bd75562eb76ca9b41c0 /synapse/http/client.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentRun complement with Synapse workers manually. (#10039) (diff)
downloadsynapse-2d83d1906161ab7794ee41265ff49f3b3ff1c591.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r--synapse/http/client.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py

index 5f40f16e24..1ca6624fd5 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py
@@ -813,7 +813,12 @@ class _ReadBodyWithMaxSizeProtocol(protocol.Protocol): if self.deferred.called: return - self.stream.write(data) + try: + self.stream.write(data) + except Exception: + self.deferred.errback() + return + self.length += len(data) # The first time the maximum size is exceeded, error and cancel the # connection. dataReceived might be called again if data was received