Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add negotiateFully option when opening streams #2331

Merged
merged 3 commits into from
Dec 28, 2023

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Dec 20, 2023

Adds an option to libp2p.dialProtocol and connection.newStream to enable optimistic protocol selection but defaults to waiting for negotiation to finish before sending data.

This increases the time-to-first-byte of a stream negotiated with a single protocol but restores the previous behaviour.

Fixes #2321

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Adds an option to `libp2p.dialProtocol` and `connection.newStream` to
disable optimisitic protocol selection and default to waiting for
negotation to finish before sending data.

This increases the time-to-first-byte of a stream negotiated with a
single protocol but restores the previous behaviour.

Fixes #2321
@achingbrain achingbrain requested a review from a team as a code owner December 20, 2023 13:00
@achingbrain achingbrain merged commit 5d1f68e into main Dec 28, 2023
24 checks passed
@achingbrain achingbrain deleted the feat/add-option-to-negotiate-streams-fully branch December 28, 2023 07:37
@achingbrain achingbrain mentioned this pull request Dec 28, 2023
This was referenced Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mss.handle never resolves when optimisticSelect
2 participants