fix: don't crash the beacon if an action fails
This commit is contained in:
parent
135576c5d3
commit
1e65a7b010
@ -108,7 +108,7 @@ where
|
||||
let runtime_config = {
|
||||
let client = callback::obtain_https_client(&host_adapter, ¶ms).await?;
|
||||
|
||||
let messages::BeaconConfig { runtime_config, unfinished_actions } = make_request(
|
||||
let messages::BeaconConfig { runtime_config, unfinished_actions } = match make_request(
|
||||
&client,
|
||||
format!("https://{}/checkin", params.domain_name::<A>()?).parse()?,
|
||||
messages::RegisterBeacon {
|
||||
@ -127,7 +127,15 @@ where
|
||||
.expect("cargo did not provide a valid pkg version minor"),
|
||||
)
|
||||
}
|
||||
).await?;
|
||||
).await {
|
||||
Ok(res) => res,
|
||||
Err(e) => {
|
||||
if cfg!(debug_assertions) {
|
||||
eprintln!("Error downloading new beacon configuration: {e:?}");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
for (cmd_id, action) in unfinished_actions {
|
||||
let action_result = match action.execute(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user