]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing 'await writer.drain()' call to example (GH-29162)
authorSergey Kolesnikov <kolesnik-mipt@phystech.edu>
Thu, 25 Nov 2021 17:15:24 +0000 (20:15 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Nov 2021 17:15:24 +0000 (09:15 -0800)
Automerge-Triggered-By: GH:asvetlov
Doc/library/asyncio-stream.rst

index 95a8e4649beede07dca948eada56cd6099e2caea..ecf178adcd377ed25f9850529cd4bf24fc91c6d2 100644 (file)
@@ -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}')