Skip to content

Commit

Permalink
Support AIX keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnelises committed Jul 23, 2024
1 parent 3afcc3d commit aa10f0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tokio-postgres/src/keepalive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ 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", target_os = "openbsd")))]
#[cfg(not(any(
target_os = "aix",
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 = "aix",
target_os = "redox",
target_os = "solaris",
target_os = "windows",
Expand Down

0 comments on commit aa10f0d

Please sign in to comment.