mirror of https://github.com/ekzhang/bore.git
Fix Windows cargo test (#35)
This commit is contained in:
parent
e25f021505
commit
e61362915d
|
@ -84,7 +84,7 @@ impl Server {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
info!(?port, "new client");
|
info!(?port, "new client");
|
||||||
let listener = match TcpListener::bind(("::", port)).await {
|
let listener = match TcpListener::bind(("0.0.0.0", port)).await {
|
||||||
Ok(listener) => listener,
|
Ok(listener) => listener,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
warn!(?port, "could not bind to local port");
|
warn!(?port, "could not bind to local port");
|
||||||
|
|
|
@ -26,7 +26,7 @@ async fn spawn_client(secret: Option<&str>) -> Result<(TcpListener, SocketAddr)>
|
||||||
let listener = TcpListener::bind("localhost:0").await?;
|
let listener = TcpListener::bind("localhost:0").await?;
|
||||||
let local_port = listener.local_addr()?.port();
|
let local_port = listener.local_addr()?.port();
|
||||||
let client = Client::new("localhost", local_port, "localhost", 0, secret).await?;
|
let client = Client::new("localhost", local_port, "localhost", 0, secret).await?;
|
||||||
let remote_addr = ([0, 0, 0, 0], client.remote_port()).into();
|
let remote_addr = ([127, 0, 0, 1], client.remote_port()).into();
|
||||||
tokio::spawn(client.listen());
|
tokio::spawn(client.listen());
|
||||||
Ok((listener, remote_addr))
|
Ok((listener, remote_addr))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue