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

std::net: TcpListener shrinks the backlog argument to 32 for Haiku. #123857

Merged
merged 1 commit into from Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions library/std/src/sys_common/net.rs
Expand Up @@ -417,6 +417,10 @@ impl TcpListener {
// it allows up to about 37, but other times it doesn't even
// accept 32. There may be a global limitation causing this.
let backlog = 20;
} else if #[cfg(target_os = "haiku")] {
// Haiku does not support a queue length > 32
// https://github.com/haiku/haiku/blob/979a0bc487864675517fb2fab28f87dc8bf43041/headers/posix/sys/socket.h#L81
let backlog = 32;
} else {
// The default for all other platforms
let backlog = 128;
Expand Down