Commit f6831bfa authored by Denis Bilenko's avatar Denis Bilenko

Merge pull request #411 from fantix/getaddrinfo_hints

Use only family in getaddrinfo hints when socket.connect
parents 15b91d4d 01729eff
......@@ -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