Skip to content

Commit

Permalink
Use 0.0.0.0 to check if a port is in use instead of 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Jul 31, 2024
1 parent 0b88503 commit c1f8951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/crates/stellar-ledger/tests/test/emulator_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ fn get_available_ports(n: usize) -> (u16, u16) {
let mut ports = Vec::with_capacity(n);
while ports.len() < n {
if let Some(port) = range.next() {
if let Ok(listener) = TcpListener::bind(("127.0.0.1", port)) {
if let Ok(listener) = TcpListener::bind(("0.0.0.0", port)) {
ports.push(port);
drop(listener);
}
Expand Down

0 comments on commit c1f8951

Please sign in to comment.