Skip to content

Commit

Permalink
wait_for_arm: properly retry without timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sk1p committed Jul 24, 2024
1 parent 0f820ee commit 6bfe1fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/src/generic_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ where
// wait indefinitely:
loop {
let res = self.wait_for_arm_inner(Duration::from_millis(100), &periodic_callback);
if let Err(ConnectionError::Timeout) = &res {
continue;
} else {
break res;
match res {
Err(ConnectionError::Timeout) => continue,
Ok(None) => continue,
other => break other, // error, or Some(result)
}
}
}
Expand Down

0 comments on commit 6bfe1fb

Please sign in to comment.