server_hostname is only useful for TLS connections
This commit is contained in:
parent
ae01201d39
commit
899d6f69d8
1 changed files with 3 additions and 1 deletions
|
@ -43,10 +43,12 @@ class TCPTransport(ITCPTransport):
|
||||||
if not bindhost is None:
|
if not bindhost is None:
|
||||||
local_addr = (bindhost, 0)
|
local_addr = (bindhost, 0)
|
||||||
|
|
||||||
|
server_hostname = hostname if tls else None
|
||||||
|
|
||||||
reader, writer = await open_connection(
|
reader, writer = await open_connection(
|
||||||
hostname,
|
hostname,
|
||||||
port,
|
port,
|
||||||
server_hostname=hostname,
|
server_hostname=server_hostname,
|
||||||
ssl =cur_ssl,
|
ssl =cur_ssl,
|
||||||
local_addr =local_addr)
|
local_addr =local_addr)
|
||||||
return (TCPReader(reader), TCPWriter(writer))
|
return (TCPReader(reader), TCPWriter(writer))
|
||||||
|
|
Loading…
Reference in a new issue