Fix/improve comments for LISTEN_BACKLOG_SIZE - #1915
Merged
Merged
Conversation
Collaborator
|
Reading https://github.com/rust-lang/rust/blob/4f808ba6bf9f1c8dde30d009e73386d984491587/library/std/src/sys/net/connection/socket.rs#L538-L541 now, these values might be wrong. Might have to revert #1896 or split TCP from Unix values. |
Collaborator
|
Location in the standard lib: |
Contributor
Author
|
I think having separate TCP and unix backlogs would be best. For TCP, I think sticking with the old value of 1024 makes sense to avoid breaking existing users, but maybe the special cases for horizon and haiku could be added. Should I close this and open an issue instead? |
Thomasdezeeuw
approved these changes
Feb 24, 2026
Thomasdezeeuw
left a comment
Collaborator
There was a problem hiding this comment.
Going to merge this and send a follow pr to change the values. Thanks @opara-tor
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.
The backlog size logic that was copied from the standard library was for unix sockets, not inet sockets. Mio's backlog sizes differ greatly from the standard library for inet sockets (128 or smaller). The comments here were confusing/misleading, so I've tried to clarify them.