summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGasper Zejn <zejn@kiberpipa.org>2016-08-12 15:32:42 +0200
committerGasper Zejn <zejn@kiberpipa.org>2016-08-12 15:32:42 +0200
commiteccd7f1c982409f7c1f507f86fd7c3937bdf75e9 (patch)
tree3bd1f6c20e517b919a06b0b28b7081c6bb0e2880
parent2587d82af8d7a211f7685f0a8a7a198954650586 (diff)
downloadslixmpp-eccd7f1c982409f7c1f507f86fd7c3937bdf75e9.tar.gz
slixmpp-eccd7f1c982409f7c1f507f86fd7c3937bdf75e9.tar.bz2
slixmpp-eccd7f1c982409f7c1f507f86fd7c3937bdf75e9.tar.xz
slixmpp-eccd7f1c982409f7c1f507f86fd7c3937bdf75e9.zip
Provide domain name to loop.create_connection if using SSL.
-rw-r--r--slixmpp/xmlstream/xmlstream.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index f11a4a16..bd6c4e6f 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -302,7 +302,8 @@ class XMLStream(asyncio.BaseProtocol):
yield from self.loop.create_connection(lambda: self,
self.address[0],
self.address[1],
- ssl=self.use_ssl)
+ ssl=self.use_ssl,
+ server_hostname=self.default_domain if self.use_ssl else None)
except Socket.gaierror as e:
self.event('connection_failed',
'No DNS record available for %s' % self.default_domain)