From: Sergey Kolesnikov Date: Thu, 25 Nov 2021 17:15:24 +0000 (+0300) Subject: Add missing 'await writer.drain()' call to example (GH-29162) X-Git-Tag: v3.11.0a3~130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0f8a3e9b96bbc2597f61be96993ef0c768a19fe;p=thirdparty%2FPython%2Fcpython.git Add missing 'await writer.drain()' call to example (GH-29162) Automerge-Triggered-By: GH:asvetlov --- diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 95a8e4649bee..ecf178adcd37 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}')