Skip to content

Commit 1ce559b

Browse files
committed
std::net: TcpListener shrinks the backlog argument to 32 for Haiku.
1 parent 7bdae13 commit 1ce559b

File tree

1 file changed

+4
-0
lines changed
  • library/std/src/sys_common

1 file changed

+4
-0
lines changed

Diff for: library/std/src/sys_common/net.rs

+4
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ impl TcpListener {
417417
// it allows up to about 37, but other times it doesn't even
418418
// accept 32. There may be a global limitation causing this.
419419
let backlog = 20;
420+
} else if #[cfg(target_os = "haiku")] {
421+
// Haiku does not support a queue length > 32
422+
// https://github.com/haiku/haiku/blob/979a0bc487864675517fb2fab28f87dc8bf43041/headers/posix/sys/socket.h#L81
423+
let backlog = 32;
420424
} else {
421425
// The default for all other platforms
422426
let backlog = 128;

0 commit comments

Comments
 (0)