Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc867352

Browse files
committed
Only call set_tcp_user_timeout when enabled
1 parent1e1f6bf commitc867352

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎tokio-postgres/src/connect_socket.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ pub(crate) async fn connect_socket(
2727
stream.set_nodelay(true).map_err(Error::connect)?;
2828

2929
let sock_ref =SockRef::from(&stream);
30+
3031
#[cfg(target_os ="linux")]
31-
{
32+
ifletSome(tcp_user_timeout) = tcp_user_timeout{
3233
sock_ref
33-
.set_tcp_user_timeout(tcp_user_timeout)
34+
.set_tcp_user_timeout(Some(tcp_user_timeout))
3435
.map_err(Error::connect)?;
3536
}
3637

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp