Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
across backends (asyncio returned immediately; Trio raised ``ValueError``) by
raising ``ValueError`` on all backends
(`#1306 <https://github.com/agronholm/anyio/issues/1306>`_; PR by @BetterAndBetterII)
- Fixed ``create_tcp_listener()`` occasionally failing with a message like
``Could not create 2 listeners with a consistent port`` when an ephemeral port is
requested and IPv6 is enabled and the dual-stack path is not available or a specific
local host name was given

**4.15.1**

Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_core/_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def setup_raw_socket(

errors: list[OSError] = []
try:
for _ in range(len(sockaddrs)):
for _ in range(10): # enough to absorb ephemeral port collisions
Comment thread
EmmanuelNiyonshuti marked this conversation as resolved.
listeners: list[SocketListener] = []
bound_ephemeral_port = local_port
try:
Expand Down