summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-05-28 18:31:28 (GMT)
committerGitHub <noreply@github.com>2018-05-28 18:31:28 (GMT)
commitdbf102271fcc316f353c7e0a283811b661d128f2 (patch)
tree8807a0305490616dc3b480fae5e50e98c80b4fa8 /Lib/asyncio/unix_events.py
parente549c4be5fb010f5faf12236af8faa720a1429be (diff)
downloadcpython-dbf102271fcc316f353c7e0a283811b661d128f2.zip
cpython-dbf102271fcc316f353c7e0a283811b661d128f2.tar.gz
cpython-dbf102271fcc316f353c7e0a283811b661d128f2.tar.bz2
bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)
In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index f64037a..7cad7e3 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -20,6 +20,7 @@ from . import coroutines
from . import events
from . import futures
from . import selector_events
+from . import tasks
from . import transports
from .log import logger
@@ -308,6 +309,9 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
ssl, backlog, ssl_handshake_timeout)
if start_serving:
server._start_serving()
+ # Skip one loop iteration so that all 'loop.add_reader'
+ # go through.
+ await tasks.sleep(0, loop=self)
return server