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

fix(tcp): make TCP_NODELAY actually the default #5764

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

elenaf9
Copy link
Contributor

@elenaf9 elenaf9 commented Dec 25, 2024

Description

Nagle's algorithm is actually disabled by setting TCP_NODELAY to true. In the current master, it is set to false, i.e. Nagle's algorithm is enabled.
This PR sets TCP_NODELAY per default to true and fixes the description of tcp::Config::new.

Fixes #4890.

Notes & open questions

Brought up by users in #5469 (comment) and #4916 (comment)

I also removed the Option around Config.nodelay because even it in the current master it can never be None. However, that means user's can never opt to just use the OS defaults.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this Elena!
LGTM

@jxs jxs added send-it and removed send-it labels Jan 10, 2025
@jxs
Copy link
Member

jxs commented Jan 10, 2025

@Mergifyio queue

Copy link
Contributor

mergify bot commented Jan 10, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at ba8da16

@mergify mergify bot merged commit ba8da16 into libp2p:master Jan 10, 2025
70 checks passed
@elenaf9 elenaf9 deleted the tcp/enable-tcp_nodelay branch January 11, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(tcp): make TCP_NODELAY the default
2 participants