We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eb4bbe commit 50efd4eCopy full SHA for 50efd4e
src/mavlink/mavlink_camera.rs
@@ -347,8 +347,6 @@ fn receive_message_loop(
347
drop(information);
348
349
loop {
350
- std::thread::sleep(std::time::Duration::from_millis(10));
351
-
352
if let Ok(state) = atomic_thread_state.lock().as_deref_mut() {
353
match state {
354
ThreadState::DEAD => break,
@@ -358,9 +356,13 @@ fn receive_message_loop(
358
356
reconnect(&mavlink_camera_information.lock().unwrap().clone());
359
357
*state = ThreadState::RUNNING;
360
}
361
- ThreadState::ZOMBIE => continue,
+ ThreadState::ZOMBIE => {
+ std::thread::sleep(std::time::Duration::from_secs(1));
+ continue;
362
+ }
363
364
} else {
365
+ std::thread::sleep(std::time::Duration::from_millis(10));
366
continue;
367
368
0 commit comments