File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,12 @@ fn heartbeat_loop(
325
325
"Failed to send heartbeat as {:#?}:{:#?}. Reason: {error}" ,
326
326
header. system_id, header. component_id
327
327
) ;
328
+ {
329
+ let mavlink:: error:: MessageWriteError :: Io ( io_error) = & error;
330
+ if io_error. kind ( ) == std:: io:: ErrorKind :: WouldBlock {
331
+ continue ;
332
+ }
333
+ }
328
334
* atomic_thread_state. lock ( ) . unwrap ( ) = ThreadState :: RESTART ;
329
335
} else {
330
336
debug ! (
@@ -830,6 +836,11 @@ fn receive_message_loop(
830
836
error ! ( "Error receiving a message as {:#?}:{:#?}. Reason: {error:#?}. Camera: {information:#?}" ,
831
837
our_header. system_id, our_header. component_id
832
838
) ;
839
+ if let mavlink:: error:: MessageReadError :: Io ( io_error) = & error {
840
+ if io_error. kind ( ) == std:: io:: ErrorKind :: WouldBlock {
841
+ continue ;
842
+ }
843
+ }
833
844
* atomic_thread_state. lock ( ) . unwrap ( ) = ThreadState :: RESTART ;
834
845
}
835
846
}
You can’t perform that action at this time.
0 commit comments