mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-27456: Ensure TCP_NODELAY is set on linux (#4231)
This commit is contained in:
parent
4ac5150e06
commit
e796b2fe26
6 changed files with 53 additions and 31 deletions
|
|
@ -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}')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue