Skip to content

Commit 8734167

Browse files
committed
Try fix #17
1 parent 0cf800a commit 8734167

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

async-ssh2-lite/tests/integration_tests/remote_port_forwarding.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn simple_with_tokio() -> Result<(), Box<dyn error::Error>> {
2929

3030
let ssh_server_connect_addr = get_connect_addr()?;
3131

32-
let remote_port = portpicker::pick_unused_port().unwrap();
32+
let remote_port = http_server_listen_addr.port() + 1;
3333

3434
//
3535
let server_task: tokio::task::JoinHandle<Result<(), Box<dyn error::Error + Send + Sync>>> =
@@ -96,6 +96,9 @@ async fn simple_with_tokio() -> Result<(), Box<dyn error::Error>> {
9696
Ok(())
9797
});
9898

99+
//
100+
tokio::time::sleep(tokio::time::Duration::from_millis(200)).await;
101+
99102
//
100103
let mut session =
101104
AsyncSession::<async_ssh2_lite::TokioTcpStream>::connect(ssh_server_connect_addr, None)

0 commit comments

Comments
 (0)