bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)

This commit is contained in:
Andrew Svetlov 2018-12-03 21:08:13 +02:00 committed by GitHub
parent 3bb150d814
commit 3bc0ebab17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 42 deletions

View file

@ -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