[Python-checkins] Add missing 'await writer.drain()' call to example (GH-29162)

miss-islington webhook-mailer at python.org
Thu Nov 25 12:15:33 EST 2021


https://github.com/python/cpython/commit/e0f8a3e9b96bbc2597f61be96993ef0c768a19fe
commit: e0f8a3e9b96bbc2597f61be96993ef0c768a19fe
branch: main
author: Sergey Kolesnikov <kolesnik-mipt at phystech.edu>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-11-25T09:15:24-08:00
summary:

Add missing 'await writer.drain()' call to example (GH-29162)



Automerge-Triggered-By: GH:asvetlov

files:
M Doc/library/asyncio-stream.rst

diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 95a8e4649beed..ecf178adcd377 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -352,6 +352,7 @@ TCP echo client using the :func:`asyncio.open_connection` function::
 
         print(f'Send: {message!r}')
         writer.write(message.encode())
+        await writer.drain()
 
         data = await reader.read(100)
         print(f'Received: {data.decode()!r}')



More information about the Python-checkins mailing list