Merge branch 'develop' of ssh://git.mannheim.ccc.de:1337/C3MA/PlantCtrl into develop

This commit is contained in:
2026-03-18 01:25:29 +01:00
10 changed files with 225 additions and 129 deletions

View File

@@ -320,16 +320,16 @@ impl Esp<'_> {
let ntp_addrs = stack
.dns_query(NTP_SERVER, DnsQueryType::A)
.await
.expect("Failed to resolve DNS");
if ntp_addrs.is_empty() {
.await;
if ntp_addrs.is_err() {
bail!("Failed to resolve DNS");
}
info!("NTP server: {ntp_addrs:?}");
let ntp = ntp_addrs.unwrap()[0];
info!("NTP server: {ntp:?}");
let mut counter = 0;
loop {
let addr: IpAddr = ntp_addrs[0].into();
let addr: IpAddr = ntp.into();
let timeout = get_time(SocketAddr::from((addr, 123)), &socket, context)
.with_timeout(Duration::from_millis((_max_wait_ms / 10) as u64))
.await;