Skip to content

Commit 56c579f

Browse files
wbarnhavoutilad
authored andcommitted
Strip trailing dot off hostname. (dpkp#133)
Co-authored-by: Dave Voutila <[email protected]>
1 parent e128e46 commit 56c579f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/conn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def _wrap_ssl(self):
496496
try:
497497
self._sock = self._ssl_context.wrap_socket(
498498
self._sock,
499-
server_hostname=self.host,
499+
server_hostname=self.host.rstrip("."),
500500
do_handshake_on_connect=False)
501501
except ssl.SSLError as e:
502502
log.exception('%s: Failed to wrap socket in SSLContext!', self)

0 commit comments

Comments
 (0)