summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-16 00:32:25 (GMT)
committerGitHub <noreply@github.com>2017-12-16 00:32:25 (GMT)
commite796b2fe26f220107ac50667de6cc86c82b465e3 (patch)
treecdf3d558b8686983e5de71ea5783770eb415ea8d /Lib/asyncio/unix_events.py
parent4ac5150e068a3a795ef00465f6dff51747b62b91 (diff)
downloadcpython-e796b2fe26f220107ac50667de6cc86c82b465e3.zip
cpython-e796b2fe26f220107ac50667de6cc86c82b465e3.tar.gz
cpython-e796b2fe26f220107ac50667de6cc86c82b465e3.tar.bz2
bpo-27456: Ensure TCP_NODELAY is set on linux (#4231)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index b9bdf87..50d78c8 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -222,7 +222,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
if sock is None:
raise ValueError('no path and sock were specified')
if (sock.family != socket.AF_UNIX or
- not base_events._is_stream_socket(sock)):
+ not base_events._is_stream_socket(sock.type)):
raise ValueError(
f'A UNIX Domain Stream Socket was expected, got {sock!r}')
sock.setblocking(False)
@@ -276,7 +276,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
'path was not specified, and no sock specified')
if (sock.family != socket.AF_UNIX or
- not base_events._is_stream_socket(sock)):
+ not base_events._is_stream_socket(sock.type)):
raise ValueError(
f'A UNIX Domain Stream Socket was expected, got {sock!r}')