Skip to content

WebTransport Swift 1.3.7

Choose a tag to compare

@Pummelchen Pummelchen released this 13 Sep 01:00
· 657 commits to main since this release

A defect-fix release for issue #23: a listener stopped accepting for the rest of its life once it had served maxConcurrentConnections sessions in total. No wire-format changes; nothing is added to or removed from the public API.

The defect

WebTransportServer passed maxConcurrentConnections to NetworkListener.newConnectionLimit. On macOS 26 that limit is a budget for the listener's whole life rather than a concurrency cap: measured with a minimal listener, a limit of 2 hands exactly two connections to its handler and never a third, however long ago the first two ended, and a connection that ends never returns its slot. The default ceiling of 16 is low enough to reach in normal operation, and the failure was silent — the process stayed healthy, every other transport it served kept working, and each new WebTransport session timed out instead.

The fix

The listener now runs without that limit and the runtime counts in-flight connections itself. A connection is admitted only while fewer than maxConcurrentConnections are being served, and its slot is returned exactly once: when the session is closed, when the peer closes it, when a session is released without being closed, or when an accept fails. Connections over the ceiling are still refused before their handshake is driven, so the ceiling's effect is unchanged; only its lifetime was wrong.

Verification

  • 297 package tests pass, including two new regression tests: five sequential sessions against a ceiling of 2, and the reported shape — the default ceiling of 16 with 20 sequential sessions. The former fails against 1.3.6 on the third session with network runtime operation timed out after 5000ms.
  • A connection arriving while the ceiling is held by a live session is still refused, so the ceiling cannot be dropped by accident.
  • Both 40-scenario CLI conformance suites pass, the peer-input fuzz corpus passes under AddressSanitizer, the in-process suite passes under Thread Sanitizer, and the two release binaries were built twice and compared by normalized Mach-O hash.

Assets

WebTransportClient and WebTransportServer are thin arm64 Mach-O binaries; SHA256SUMS covers both. They are ad-hoc signed and not notarized, so Gatekeeper quarantines them on first run:

shasum -a 256 -c SHA256SUMS
xattr -d com.apple.quarantine WebTransportClient WebTransportServer
./WebTransportServer --scenario all