Skip to content

Commit b1a4c53

Browse files
wbarnhavoutilad
andauthored
Strip trailing dot off hostname. (dpkp#133)
Co-authored-by: Dave Voutila <[email protected]>
1 parent 88763da commit b1a4c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/conn.py

Lines changed: 1 addition & 1 deletion
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)