Skip to content

Commit

Permalink
Fix liveliness timeout type (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Dec 30, 2024
1 parent d3db684 commit 247fab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ typedef struct z_liveliness_get_options_t {
/**
* The timeout for the liveliness query in milliseconds. 0 means default query timeout from zenoh configuration.
*/
uint32_t timeout_ms;
uint64_t timeout_ms;
} z_liveliness_get_options_t;
typedef struct z_moved_liveliness_token_t {
struct z_owned_liveliness_token_t _this;
Expand Down
4 changes: 2 additions & 2 deletions src/liveliness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub extern "C" fn zc_liveliness_declare_background_subscriber(
#[repr(C)]
pub struct z_liveliness_get_options_t {
/// The timeout for the liveliness query in milliseconds. 0 means default query timeout from zenoh configuration.
timeout_ms: u32,
timeout_ms: u64,
}

/// @brief Constructs default value `z_liveliness_get_options_t`.
Expand Down Expand Up @@ -266,7 +266,7 @@ pub extern "C" fn z_liveliness_get(
})
});
if let Some(options) = options {
builder = builder.timeout(core::time::Duration::from_millis(options.timeout_ms as u64));
builder = builder.timeout(core::time::Duration::from_millis(options.timeout_ms));
}
match builder.wait() {
Ok(()) => result::Z_OK,
Expand Down

0 comments on commit 247fab4

Please sign in to comment.