-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Things to check first
- I have searched the existing issues and didn't find my feature already requested there
Feature description
it would be nice if
multilistener = await create_tcp_listener(local_port=0)used the same port for both of the listeners. This would be [implemented via something roughly] likedef get_free_ipv4_ipv6_port(kind, bind_ipv4_addr, bind_ipv6_addr): if platform_has_dualstack and bind_ipv4_addr == bind_ipv6_addr == "": # We can use the dualstack_sock.bind(("", 0)) trick ... else: ...Currently, folks who need this have to implement it downstream.)
Ow, that's definitely something I would like to fix! Strange that nobody has reported that as an issue. I definitely meant for the listener to bind to the same ephemeral port if the local port was omitted.
Originally posted by @agronholm in #856 (comment)
Use case
.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request