Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1f6bf commit c867352Copy full SHA for c867352
tokio-postgres/src/connect_socket.rs
@@ -27,10 +27,11 @@ pub(crate) async fn connect_socket(
27
stream.set_nodelay(true).map_err(Error::connect)?;
28
29
let sock_ref = SockRef::from(&stream);
30
+
31
#[cfg(target_os = "linux")]
- {
32
+ if let Some(tcp_user_timeout) = tcp_user_timeout {
33
sock_ref
- .set_tcp_user_timeout(tcp_user_timeout)
34
+ .set_tcp_user_timeout(Some(tcp_user_timeout))
35
.map_err(Error::connect)?;
36
}
37
0 commit comments