Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/devstack-hub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3548,12 +3548,12 @@ mod daemon_send_tests {
}

/// A port nothing listens on.
/// A port nothing answers on: a privileged one, which no test (nor any
/// unprivileged process) can listen on. A port bound and let go of may
/// serve another test's listener a moment later (seen on macOS), and one
/// bound without listening is not refused there but left to time out.
fn closed() -> u16 {
std::net::TcpListener::bind(("127.0.0.1", 0))
.unwrap()
.local_addr()
.unwrap()
.port()
1
}

fn serves(port: u16) -> DaemonNow {
Expand Down
Loading