Skip to content

Commit b13fa3f

Browse files
committed
Merge pull request #169 from snaury/patch-1
Support IPv6 hosts and networks
2 parents fddc152 + 2e9a247 commit b13fa3f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kafka/conn.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,5 @@ def reinit(self):
149149
Re-initialize the socket connection
150150
"""
151151
self.close()
152-
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
153-
self._sock.settimeout(self.timeout)
154-
self._sock.connect((self.host, self.port))
152+
self._sock = socket.create_connection((self.host, self.port), self.timeout)
155153
self._dirty = False

0 commit comments

Comments
 (0)