Test TCP connect failed case

This commit is contained in:
Yin Guanhao 2020-05-15 12:18:39 +08:00
parent f267ab1152
commit 5c720b0112
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ fn tcp_connection() -> io::Result<()> {
stream1.get_ref().local_addr()?
);
// Now that the listener is closed, connect should fail.
Async::<TcpStream>::connect(&addr).await.unwrap_err();
Ok(())
})
}