From 899d6f69d81ebfffd0bfb67ac8606808b85a6385 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 19 Apr 2020 23:05:21 +0100 Subject: [PATCH] server_hostname is only useful for TLS connections --- ircrobots/transport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircrobots/transport.py b/ircrobots/transport.py index 2df636a..2d276ff 100644 --- a/ircrobots/transport.py +++ b/ircrobots/transport.py @@ -43,10 +43,12 @@ class TCPTransport(ITCPTransport): if not bindhost is None: local_addr = (bindhost, 0) + server_hostname = hostname if tls else None + reader, writer = await open_connection( hostname, port, - server_hostname=hostname, + server_hostname=server_hostname, ssl =cur_ssl, local_addr =local_addr) return (TCPReader(reader), TCPWriter(writer))