summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/proactor_events.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2018-12-03 19:08:13 (GMT)
committerGitHub <noreply@github.com>2018-12-03 19:08:13 (GMT)
commit3bc0ebab17bf5a2c29d2214743c82034f82e6573 (patch)
tree4dd0d06eb85963408b9d811b19d07116a51a70c7 /Lib/asyncio/proactor_events.py
parent3bb150d8148e3cc08418077a58f43e064b9fde61 (diff)
downloadcpython-3bc0ebab17bf5a2c29d2214743c82034f82e6573.zip
cpython-3bc0ebab17bf5a2c29d2214743c82034f82e6573.tar.gz
cpython-3bc0ebab17bf5a2c29d2214743c82034f82e6573.tar.bz2
bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r--Lib/asyncio/proactor_events.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index ad23918..69d96a8 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -13,7 +13,6 @@ import warnings
from . import base_events
from . import constants
-from . import events
from . import futures
from . import exceptions
from . import protocols
@@ -445,6 +444,11 @@ class _ProactorSocketTransport(_ProactorReadPipeTransport,
_sendfile_compatible = constants._SendfileMode.TRY_NATIVE
+ def __init__(self, loop, sock, protocol, waiter=None,
+ extra=None, server=None):
+ super().__init__(loop, sock, protocol, waiter, extra, server)
+ base_events._set_nodelay(sock)
+
def _set_extra(self, sock):
self._extra['socket'] = sock