summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-19 11:44:37 (GMT)
committerGitHub <noreply@github.com>2017-12-19 11:44:37 (GMT)
commita7bd64c0c01379e9b82e86ad41a301329a0775d9 (patch)
tree142cbba8e3f45cc386120bc92d5241a141f7aaf7 /Lib/asyncio/selector_events.py
parent5d8624647d0b8ccb22b17b9e819a8e0c3fb4fe4a (diff)
downloadcpython-a7bd64c0c01379e9b82e86ad41a301329a0775d9.zip
cpython-a7bd64c0c01379e9b82e86ad41a301329a0775d9.tar.gz
cpython-a7bd64c0c01379e9b82e86ad41a301329a0775d9.tar.bz2
bpo-27456: Simplify sock type checks (#4922)
Recent sock.type fix (see bug 32331) makes sock.type checks simpler in asyncio.
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 3f44a99..3b49b0c 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
- base_events._is_stream_socket(sock.type) and
+ sock.type == socket.SOCK_STREAM and
sock.proto == socket.IPPROTO_TCP):
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
else: