Skip to content

Commit

Permalink
Return error if timestamp cannot be optained
Browse files Browse the repository at this point in the history
Init should return an error code, if there is any error and not just
log the problem and forget about it, otherwise the user cannot handle it
  • Loading branch information
gumulka committed Sep 4, 2024
1 parent a985098 commit cbd1545
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/thingsboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ int thingsboard_init(attr_write_callback_t cb, const struct tb_fw_id *fw_id) {
ret = k_sem_take(&time_sem, K_SECONDS(10));
if (ret < 0) {
LOG_ERR("Failed to wait for timestamp: %d", ret);
return ret;
}

return 0;
Expand Down

0 comments on commit cbd1545

Please sign in to comment.