Skip to content

Commit 45d51d7

Browse files
authored
OpenBSD misses some TCP keepalive options
1 parent b19fdd4 commit 45d51d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokio-postgres/src/keepalive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ impl From<&KeepaliveConfig> for TcpKeepalive {
1212
fn from(keepalive_config: &KeepaliveConfig) -> Self {
1313
let mut tcp_keepalive = Self::new().with_time(keepalive_config.idle);
1414

15-
#[cfg(not(any(target_os = "redox", target_os = "solaris")))]
15+
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "openbsd")))]
1616
if let Some(interval) = keepalive_config.interval {
1717
tcp_keepalive = tcp_keepalive.with_interval(interval);
1818
}
1919

20-
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "windows")))]
20+
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "windows", target_os = "openbsd")))]
2121
if let Some(retries) = keepalive_config.retries {
2222
tcp_keepalive = tcp_keepalive.with_retries(retries);
2323
}

0 commit comments

Comments
 (0)