Skip to content

Commit 3493a91

Browse files
committed
Make pollKeepalive optional in the udl
1 parent b4906ff commit 3493a91

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.unreleased/fix_pollKeepalive

Whitespace-only changes.

crates/telio-model/src/features.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ pub struct FeatureDerp {
330330
/// Poll Keepalive: Application level keepalives meant to replace the TCP keepalives
331331
/// They will use derp_keepalive as interval
332332
#[serde(default)]
333-
pub poll_keepalive: bool,
333+
pub poll_keepalive: Option<bool>,
334334
/// Enable polling of remote peer states to reduce derp traffic
335335
pub enable_polling: Option<bool>,
336336
/// Use Mozilla's root certificates instead of OS ones [default false]
@@ -631,7 +631,7 @@ mod tests {
631631
derp: Some(FeatureDerp {
632632
tcp_keepalive: Some(13),
633633
derp_keepalive: Some(14),
634-
poll_keepalive: true,
634+
poll_keepalive: Some(true),
635635
enable_polling: Some(true),
636636
use_built_in_root_certificates: true,
637637
}),

crates/telio-relay/src/derp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl From<&Option<FeatureDerp>> for DerpKeepaliveConfig {
149149
if let Some(derp_ka) = derp.derp_keepalive {
150150
derp_keepalive = derp_ka;
151151
}
152-
poll_keepalive = derp.poll_keepalive;
152+
poll_keepalive = derp.poll_keepalive.unwrap_or_default();
153153
}
154154

155155
DerpKeepaliveConfig {

src/libtelio.udl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ dictionary FeatureDerp {
686686
u32? derp_keepalive;
687687
/// Poll Keepalive: Application level keepalives meant to replace the TCP keepalives
688688
/// They will reuse the derp_keepalive interval
689-
boolean poll_keepalive;
689+
boolean? poll_keepalive;
690690
/// Enable polling of remote peer states to reduce derp traffic
691691
boolean? enable_polling;
692692
/// Use Mozilla's root certificates instead of OS ones [default false]

0 commit comments

Comments
 (0)