fix: update listening address parameter in echo example to accept a list

This commit is contained in:
yashksaini-coder
2025-08-19 22:32:26 +05:30
parent 3ff5728209
commit 69d5274891

View File

@ -47,7 +47,7 @@ async def run(port: int, destination: str, seed: int | None = None) -> None:
secret = secrets.token_bytes(32)
host = new_host(key_pair=create_new_key_pair(secret))
async with host.run(listen_addr=listen_addr), trio.open_nursery() as nursery:
async with host.run(listen_addrs=[listen_addr]), trio.open_nursery() as nursery:
# Start the peer-store cleanup task
nursery.start_soon(host.get_peerstore().start_cleanup_task, 60)