summaryrefslogtreecommitdiff
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-06-28 11:00:22 -0400
committerYury Selivanov <yury@magic.io>2016-06-28 11:00:22 -0400
commit0f9508df1fb2ddbff68f4057d395a2b209aee170 (patch)
tree53457dc33cfd153d00d1191af6abcdc18a394c68 /Lib/asyncio/selector_events.py
parent8a9c95713d023ebe8321e6d9981add9c1c0a8b23 (diff)
downloadcpython-0f9508df1fb2ddbff68f4057d395a2b209aee170.tar.gz
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 9564d01dfa..ed2b4d756f 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))