Assume that no ping 5x means unsupported

This commit is contained in:
QuantumEntangledAndy committed 2023-10-19 10:39:49 +07:00
1 parent 6ec0600445
commit b1305c3fc8
1 file changed
+3 -2
+3 -2
View File
@@ -73,13 +73,14 @@ impl NeoCamThread {
futures::future::pending().await
},
Ok(Err(e)) => return Err(e.into()),
Err(e) => {
Err(_) => {
// Timeout
if missed_pings > 5 {
missed_pings += 1;
continue;
} else {
return AnyResult::Err(e.into()).with_context(|| "Timed out waiting for camera ping reply");
log::debug!("Timed out waiting for camera ping reply. Assuming unsupported");
futures::future::pending().await
}
}
}