diff options
author | Erik Johnston <erikj@element.io> | 2024-04-11 16:03:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 16:03:45 +0100 |
commit | 3a30846bd088bbfecd9ddfa1ee82a6951670ade7 (patch) | |
tree | 0bb7c79bf45eb6c5f6bd8063cc0230e5eb661a1d /synapse/http/site.py | |
parent | 1.105.0rc1 (diff) | |
download | synapse-3a30846bd088bbfecd9ddfa1ee82a6951670ade7.tar.xz |
Fix mypy on latest Twisted release (#17036)
`ITransport.abortConnection` isn't a thing, but `HTTPChannel.forceAbortClient` calls it, so lets just use that Fixes https://github.com/element-hq/synapse/issues/16728
Diffstat (limited to 'synapse/http/site.py')
-rw-r--r-- | synapse/http/site.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py index 682b28e4c6..a5b5780679 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -150,7 +150,8 @@ class SynapseRequest(Request): self.get_method(), self.get_redacted_uri(), ) - self.transport.abortConnection() + if self.channel: + self.channel.forceAbortClient() return super().handleContentChunk(data) |