Merge pull request #1014 from niklasha/openbsd-missing-tcp-keepalive-options
OpenBSD misses some TCP keepalive options
This commit is contained in:
commit
7dd6813fa8
@ -12,12 +12,17 @@ impl From<&KeepaliveConfig> for TcpKeepalive {
|
|||||||
fn from(keepalive_config: &KeepaliveConfig) -> Self {
|
fn from(keepalive_config: &KeepaliveConfig) -> Self {
|
||||||
let mut tcp_keepalive = Self::new().with_time(keepalive_config.idle);
|
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 {
|
if let Some(interval) = keepalive_config.interval {
|
||||||
tcp_keepalive = tcp_keepalive.with_interval(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 {
|
if let Some(retries) = keepalive_config.retries {
|
||||||
tcp_keepalive = tcp_keepalive.with_retries(retries);
|
tcp_keepalive = tcp_keepalive.with_retries(retries);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user