Skip to content

Commit

Permalink
Add missing 'await writer.drain()' call to example (pythonGH-29162)
Browse files Browse the repository at this point in the history
Automerge-Triggered-By: GH:asvetlov
  • Loading branch information
Sergey Kolesnikov authored Nov 25, 2021
1 parent 4dd8219 commit e0f8a3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit e0f8a3e

Please sign in to comment.