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 In-Vehicle Digital Twin Service Startup #32

Merged
merged 1 commit into from
Jun 13, 2023
Merged
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
15 changes: 6 additions & 9 deletions core/invehicle-digital-twin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// after 15 seconds unless the CHARIOTT_REGISTRY_TTL_SECS environment variable is set. Please make sure that
// it is set (and exported) in the shell running Chariott before Chariott has started.
if chariott_url_option.is_some() {
match register_digital_twin_service_with_chariott(
let response = register_digital_twin_service_with_chariott(
&chariott_url_option.unwrap(),
&invehicle_digital_twin_address,
)
.await
{
Ok(()) => return Ok(()),
Err(error) => {
error!("Failed to register this service with Chariott: '{error}'");
Err(error)?
}
};
.await;
if let Err(error) = response {
error!("Failed to register this service with Chariott: '{error}'");
return Err(error)?;
}
info!("This service is now registered with Chariott.");
} else {
info!("This service is not using Chariott.");
Expand Down