Pass str to twisted's IReactorTCP (#10895)

This follows a correction made in twisted/twisted#1664 and should fix our Twisted Trial CI job.

Until that change is in a twisted release, we'll have to ignore the type
of the `host` argument. I've raised #10899 to remind us to review the
issue in a few months' time.
This commit is contained in:
David Robertson 2021-09-30 12:51:47 +01:00 committed by GitHub
parent 3aefc7b66d
commit 29364145b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 11 deletions

View file

@ -364,6 +364,12 @@ def lazyConnection(
factory.continueTrying = reconnect
reactor = hs.get_reactor()
reactor.connectTCP(host.encode(), port, factory, timeout=30, bindAddress=None)
reactor.connectTCP(
host, # type: ignore[arg-type]
port,
factory,
timeout=30,
bindAddress=None,
)
return factory.handler