Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix liveliness timeout type #879

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading