Merge branch 'develop' of ssh://git.mannheim.ccc.de:1337/C3MA/PlantCtrl into develop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user