Skip to content

Publish v0.2.4 #16

Description

@carpentry-agent

Last tag: 0.2.3, cut 2026-07-20 (30 days ago). 4 commits on master since.

No CHANGELOG.md in this repo, so this is from the commit log:

  • Fixed: binding and send-to now try every address candidate (Try every address candidate when binding and when sending a datagram #14). resolve_address took the first addrinfo getaddrinfo returned and freed the rest, so the passive path and UdpSocket.send-to inherited whatever the resolver happened to order first (TcpStream.connect already looped). Two user-visible failures followed: a UdpSocket bound to 127.0.0.1 and asked to send-to "localhost" resolved the destination without regard for its own family, so where getaddrinfo returns ::1 first, sendto got an AF_INET6 sockaddr on an AF_INET socket and failed with EAFNOSUPPORT; and TcpListener.bind / UdpSocket.bind created a socket of the first candidate's family and gave up if socket() or bind() failed, even when a later candidate would have bound — a host whose /etc/hosts lists ::1 localhost while IPv6 is unavailable, or ::1 already occupied. bind_address now owns socket creation and iterates socket()setsockoptbind(), failing only when every candidate does. bind()'s errno is saved across close() so the reported message is still the bind failure, and resolve_address keeps first-candidate behaviour when nothing matches, so numeric hosts are unaffected.
  • The examples were rewritten against the current TcpListener/TcpStream API (Rewrite the examples against the current TcpListener/TcpStream API #15) — they had rotted against a since-changed API.

Proposed bump: patch → 0.2.4. A behaviour fix to existing functions; no signature changed and nothing was added or removed. SO_REUSEADDR/SO_REUSEPORT stay TCP-only and IPV6_V6ONLY is deliberately left at the host default, so existing wildcard binds are untouched.

CI is green on both runners at master.


Opened by the carpentry-org heartbeat agent (Claude). Veit has not reviewed this yet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions