summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-06-28 15:00:22 (GMT)
committerYury Selivanov <yury@magic.io>2016-06-28 15:00:22 (GMT)
commit63bf48768867a7421f8ccb956fe77f295bfd2742 (patch)
tree2f8307cab416b4208e5517423428d1c54fbce84d /Lib/asyncio/selector_events.py
parent77bc04a3bcb6c207f6b48f4e3418cd6a02909696 (diff)
downloadcpython-63bf48768867a7421f8ccb956fe77f295bfd2742.zip
cpython-63bf48768867a7421f8ccb956fe77f295bfd2742.tar.gz
cpython-63bf48768867a7421f8ccb956fe77f295bfd2742.tar.bz2
asyncio: Use socket specs for getaddrinfo() in sock_connect()
Patch by Martin Richard. GH PR #365.
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 9564d01..ed2b4d7 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -394,7 +394,8 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
if hasattr(socket, 'AF_UNIX') and sock.family == socket.AF_UNIX:
self._sock_connect(fut, sock, address)
else:
- resolved = base_events._ensure_resolved(address, loop=self)
+ resolved = base_events._ensure_resolved(
+ address, family=sock.family, proto=sock.proto, loop=self)
resolved.add_done_callback(
lambda resolved: self._on_resolved(fut, sock, resolved))