We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c0350c commit 6919d8dCopy full SHA for 6919d8d
1 file changed
crates/nfs3_client/src/smol.rs
@@ -76,9 +76,12 @@ impl Connector for SmolConnector {
76
return Err(err);
77
}
78
79
-
+
80
let std_stream: std::net::TcpStream = socket.into();
81
- let tcp_stream = TcpStream::try_from(std_stream)?;
82
- Ok(SmolIo::new(tcp_stream))
+ let async_socket = smol::Async::new_nonblocking(std_stream)?;
+ // The stream becomes writable when connected.
83
+ async_socket.writable().await?;
84
85
+ Ok(SmolIo::new(async_socket.into()))
86
87
0 commit comments