We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fddc152 commit 2e9a247Copy full SHA for 2e9a247
kafka/conn.py
@@ -149,7 +149,5 @@ def reinit(self):
149
Re-initialize the socket connection
150
"""
151
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))
+ self._sock = socket.create_connection((self.host, self.port), self.timeout)
155
self._dirty = False
0 commit comments