diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-03 15:47:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 15:47:38 -0500 |
commit | 33a02f0f52a5cd793c0d123463d8a7a1e3f4f198 (patch) | |
tree | 0d53722ffb90376b2998bdf2f206e3b9d76da9d3 /synapse/logging | |
parent | Set X-Forwarded-Proto header when frontend-proxy proxies a request (#9539) (diff) | |
download | synapse-33a02f0f52a5cd793c0d123463d8a7a1e3f4f198.tar.xz |
Fix additional type hints from Twisted upgrade. (#9518)
Diffstat (limited to 'synapse/logging')
-rw-r--r-- | synapse/logging/_remote.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/logging/_remote.py b/synapse/logging/_remote.py index f8e9112b56..174ca7be5a 100644 --- a/synapse/logging/_remote.py +++ b/synapse/logging/_remote.py @@ -32,7 +32,7 @@ from twisted.internet.endpoints import ( TCP4ClientEndpoint, TCP6ClientEndpoint, ) -from twisted.internet.interfaces import IPushProducer, ITransport +from twisted.internet.interfaces import IPushProducer, IStreamClientEndpoint, ITransport from twisted.internet.protocol import Factory, Protocol from twisted.python.failure import Failure @@ -121,7 +121,9 @@ class RemoteHandler(logging.Handler): try: ip = ip_address(self.host) if isinstance(ip, IPv4Address): - endpoint = TCP4ClientEndpoint(_reactor, self.host, self.port) + endpoint = TCP4ClientEndpoint( + _reactor, self.host, self.port + ) # type: IStreamClientEndpoint elif isinstance(ip, IPv6Address): endpoint = TCP6ClientEndpoint(_reactor, self.host, self.port) else: |