OpenBSD misses some TCP keepalive options

This commit is contained in:
Niklas Hallqvist
2023-04-04 14:27:45 +02:00
committed by GitHub
parent b19fdd4b7e
commit 45d51d708c

View File

@@ -12,12 +12,12 @@ impl From<&KeepaliveConfig> for TcpKeepalive {
fn from(keepalive_config: &KeepaliveConfig) -> Self {
let mut tcp_keepalive = Self::new().with_time(keepalive_config.idle);
#[cfg(not(any(target_os = "redox", target_os = "solaris")))]
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "openbsd")))]
if let Some(interval) = keepalive_config.interval {
tcp_keepalive = tcp_keepalive.with_interval(interval);
}
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "windows")))]
#[cfg(not(any(target_os = "redox", target_os = "solaris", target_os = "windows", target_os = "openbsd")))]
if let Some(retries) = keepalive_config.retries {
tcp_keepalive = tcp_keepalive.with_retries(retries);
}