Skip to content

Commit

Permalink
Pick local cluster runner ports in a tighter range (#2255)
Browse files Browse the repository at this point in the history
To avoid client-tcp ports (32k and up) and maybe some other processes
that deliberately bind lower ports (10k and below)
  • Loading branch information
jackkleeman authored Nov 11, 2024
1 parent 7aba62e commit d50b6ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/local-cluster-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn random_socket_address() -> io::Result<SocketAddr> {
return Err(io::Error::other("Max allocation attempts exahusted"));
}

let port = rng.gen_range(1025..u16::MAX);
let port = rng.gen_range(10000..30000);
let port_file = base_path.join(port.to_string());

match fs::OpenOptions::new()
Expand Down

0 comments on commit d50b6ad

Please sign in to comment.