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 7d1ae89 commit 320084fCopy full SHA for 320084f
Doc/library/asyncio-stream.rst
@@ -373,8 +373,8 @@ TCP echo server using the :func:`asyncio.start_server` function::
373
server = await asyncio.start_server(
374
handle_echo, '127.0.0.1', 8888)
375
376
- addr = server.sockets[0].getsockname()
377
- print(f'Serving on {addr}')
+ addrs = ', '.join(str(sock.getsockname()) for sock in server.sockets)
+ print(f'Serving on {addrs}')
378
379
async with server:
380
await server.serve_forever()
0 commit comments