Skip to content

Commit

Permalink
Merge pull request #1046 from NordSecurity/fix-pollKeepalive
Browse files Browse the repository at this point in the history
Make pollKeepalive optional
  • Loading branch information
olekoliinyk authored Dec 30, 2024
2 parents b4906ff + 3493a91 commit d71b3d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Empty file added .unreleased/fix_pollKeepalive
Empty file.
4 changes: 2 additions & 2 deletions crates/telio-model/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ pub struct FeatureDerp {
/// Poll Keepalive: Application level keepalives meant to replace the TCP keepalives
/// They will use derp_keepalive as interval
#[serde(default)]
pub poll_keepalive: bool,
pub poll_keepalive: Option<bool>,
/// Enable polling of remote peer states to reduce derp traffic
pub enable_polling: Option<bool>,
/// Use Mozilla's root certificates instead of OS ones [default false]
Expand Down Expand Up @@ -631,7 +631,7 @@ mod tests {
derp: Some(FeatureDerp {
tcp_keepalive: Some(13),
derp_keepalive: Some(14),
poll_keepalive: true,
poll_keepalive: Some(true),
enable_polling: Some(true),
use_built_in_root_certificates: true,
}),
Expand Down
2 changes: 1 addition & 1 deletion crates/telio-relay/src/derp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl From<&Option<FeatureDerp>> for DerpKeepaliveConfig {
if let Some(derp_ka) = derp.derp_keepalive {
derp_keepalive = derp_ka;
}
poll_keepalive = derp.poll_keepalive;
poll_keepalive = derp.poll_keepalive.unwrap_or_default();
}

DerpKeepaliveConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/libtelio.udl
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ dictionary FeatureDerp {
u32? derp_keepalive;
/// Poll Keepalive: Application level keepalives meant to replace the TCP keepalives
/// They will reuse the derp_keepalive interval
boolean poll_keepalive;
boolean? poll_keepalive;
/// Enable polling of remote peer states to reduce derp traffic
boolean? enable_polling;
/// Use Mozilla's root certificates instead of OS ones [default false]
Expand Down

0 comments on commit d71b3d5

Please sign in to comment.