Improve 0-RTT usability#2616
Merged
Merged
Conversation
54add8f to
5fb31c5
Compare
djc
reviewed
Apr 21, 2026
Member
|
Nice work! |
5fb31c5 to
cd2e71f
Compare
djc
approved these changes
Apr 23, 2026
Member
|
(audit failure should fall away if you rebase on |
cd2e71f to
443d914
Compare
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.
443d914 to
79cd191
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some breaking API tweaks inspired by #2613.
IMO this is a more discoverable and simpler API. As detailed in commit messages, a stream-independent
ZeroRttAcceptedsignal was difficult to use correctly beyond trivial cases.