We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 560a79f commit 659812bCopy full SHA for 659812b
Doc/library/asyncio-stream.rst
@@ -395,8 +395,8 @@ TCP echo server using the :func:`asyncio.start_server` function::
395
server = await asyncio.start_server(
396
handle_echo, '127.0.0.1', 8888)
397
398
- addr = server.sockets[0].getsockname()
399
- print(f'Serving on {addr}')
+ addrs = ', '.join(str(sock.getsockname()) for sock in server.sockets)
+ print(f'Serving on {addrs}')
400
401
async with server:
402
await server.serve_forever()
0 commit comments