Skip to content

Commit

Permalink
Rollup merge of #123857 - devnexen:tcp_listener_update_backlog, r=Chr…
Browse files Browse the repository at this point in the history
…isDenton

std::net: TcpListener shrinks the backlog argument to 32 for Haiku.
  • Loading branch information
matthiaskrgr committed Apr 12, 2024
2 parents e4c8672 + 1ce559b commit fa4c219
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit fa4c219

Please sign in to comment.