Skip to content

Improve 0-RTT usability#2616

Merged
djc merged 5 commits into
mainfrom
push-quqummnukypl
Apr 27, 2026
Merged

Improve 0-RTT usability#2616
djc merged 5 commits into
mainfrom
push-quqummnukypl

Conversation

@Ralith
Copy link
Copy Markdown
Collaborator

@Ralith Ralith commented Apr 21, 2026

Some breaking API tweaks inspired by #2613.

IMO this is a more discoverable and simpler API. As detailed in commit messages, a stream-independent ZeroRttAccepted signal was difficult to use correctly beyond trivial cases.

@Ralith Ralith added enhancement New feature or request breaking labels Apr 21, 2026
@Ralith Ralith force-pushed the push-quqummnukypl branch 6 times, most recently from 54add8f to 5fb31c5 Compare April 21, 2026 05:15
Comment thread quinn/src/recv_stream.rs Outdated
Comment thread quinn/src/connection.rs Outdated
@djc
Copy link
Copy Markdown
Member

djc commented Apr 21, 2026

Nice work!

@Ralith Ralith force-pushed the push-quqummnukypl branch from 5fb31c5 to cd2e71f Compare April 22, 2026 18:12
Comment thread quinn/src/connection.rs
Comment thread quinn/src/connection.rs Outdated
@djc
Copy link
Copy Markdown
Member

djc commented Apr 23, 2026

(audit failure should fall away if you rebase on main.)

@Ralith Ralith force-pushed the push-quqummnukypl branch from cd2e71f to 443d914 Compare April 26, 2026 22:09
Ralith added 4 commits April 26, 2026 15:35
Unlike the `ZeroRttAccepted` future, this is guaranteed to reliably indicate
whether a specific stream was rejected, even if it was opened concurrently
with completion of the handshake.
This was redundant to Connection::connected and, on clients, awaiting
SendStream::stopped. Code branching on the bool yielded by `ZeroRttAccepted`
was vulnerable to a race with any concurrent logic opening new streams.
Further, the (in)significance of the `bool` for servers was confusing.
This used more concurrency than necessary and did not guarantee actual 0-RTT
communication.
@Ralith Ralith force-pushed the push-quqummnukypl branch from 443d914 to 79cd191 Compare April 26, 2026 22:35
@djc djc added this pull request to the merge queue Apr 27, 2026
Merged via the queue into main with commit 8c479a5 Apr 27, 2026
19 checks passed
@djc djc deleted the push-quqummnukypl branch April 27, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants