mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Stabilize TCP host-only bind fallback test
This commit is contained in:
parent
9d3b62161d
commit
9361d49fa6
1 changed files with 4 additions and 2 deletions
|
|
@ -199,8 +199,10 @@ fn start_with_tcp_host_only_bind_warns_and_falls_back_when_default_port_is_unava
|
|||
let storage_root = isolated_storage_dir();
|
||||
let storage_dir = storage_root.path().join("storage");
|
||||
let occupied = match std::net::TcpListener::bind(("127.0.0.1", 32276)) {
|
||||
Ok(listener) => Some(listener),
|
||||
Err(error) if error.kind() == std::io::ErrorKind::AddrInUse => None,
|
||||
Ok(listener) => listener,
|
||||
Err(error) if error.kind() == std::io::ErrorKind::AddrInUse => {
|
||||
return;
|
||||
}
|
||||
Err(error) => panic!("failed to bind default TCP port 32276: {error}"),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue