Commit 01729eff authored by Fantix King's avatar Fantix King

Use only family in getaddrinfo hints when socket.connect

parent e26ad644
......@@ -209,7 +209,7 @@ class socket(_socket.socket):
if self.timeout == 0.0:
return _socket.socket.connect(self, address)
if isinstance(address, tuple):
r = getaddrinfo(address[0], address[1], self.family, self.type, self.proto)
r = getaddrinfo(address[0], address[1], self.family)
address = r[0][-1]
if self.timeout is not None:
timer = Timeout.start_new(self.timeout, timeout('timed out'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment