summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_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/selector_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/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 78ebf3e..cb33cd3 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -41,7 +41,7 @@ def _test_selector_event(selector, fd, event):
if hasattr(socket, 'TCP_NODELAY'):
def _set_nodelay(sock):
if (sock.family in {socket.AF_INET, socket.AF_INET6} and
- sock.type == socket.SOCK_STREAM and
+ base_events._is_stream_socket(sock.type) and
sock.proto == socket.IPPROTO_TCP):
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
else: