(feat): update mtp

This commit is contained in:
Alois 2026-07-28 21:05:25 +02:00
commit 1de479ce8d
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
8 changed files with 46 additions and 180 deletions

View file

@ -11,7 +11,6 @@ use iota_storage::users::user_manager;
use iota_storage::util::config_util::{self};
use mtp::codec::{CommunicationType, CommunicationValue};
use std::sync::{Arc, Mutex};
use std::time::Duration;
use crate::daemon_state::{ShutdownReason, StartupPhase};
@ -295,22 +294,4 @@ impl CommandRouter {
}
}
}
pub async fn ping(&self, seconds: u64) -> Result<String, String> {
let response = self
.services
.omikron
.await_response(
&CommunicationValue::new(CommunicationType::Ping),
Duration::from_secs(seconds),
)
.await;
match response {
Ok(value) => {
log!("{}", iota_logger::format_cv(&value));
Ok("Ping response received".into())
}
Err(error) => Err(format!("Ping error: {error:?}")),
}
}
}