test: fix panic in tokio stream construction

This commit is contained in:
Rob Ede 2025-03-08 17:37:40 +00:00
parent 9d4b1673aa
commit 15f0b63492
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 4 additions and 2 deletions

View File

@ -71,5 +71,7 @@ async fn new_with_builder() {
srv.connect().unwrap();
// connect to alt service defined in custom ServerBuilder
TcpStream::from_std(net::TcpStream::connect(alt_addr).unwrap()).unwrap();
let stream = net::TcpStream::connect(alt_addr).unwrap();
stream.set_nonblocking(true).unwrap();
TcpStream::from_std(stream).unwrap();
}