Skip to content

Commit

Permalink
Add default get timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Mar 20, 2024
1 parent c6cfc8a commit 280888a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions include/zenoh-pico/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,11 @@
#define ZP_ASM_NOP __asm__("nop")
#endif

/**
* Default get timeout in milliseconds.
*/
#ifndef Z_GET_TIMEOUT_DEFAULT
#define Z_GET_TIMEOUT_DEFAULT 10000
#endif

#endif /* INCLUDE_ZENOH_PICO_CONFIG_H */
2 changes: 1 addition & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ z_get_options_t z_get_options_default(void) {
#if Z_FEATURE_ATTACHMENT == 1
// TODO:ATT.attachment = z_attachment_null()
#endif
.timeout_ms = 0
.timeout_ms = Z_GET_TIMEOUT_DEFAULT
};
}

Expand Down

0 comments on commit 280888a

Please sign in to comment.