Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Sep 23, 2024
1 parent 7168101 commit db16121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rtt_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub fn spawn(args: SpawnArgs) -> io::Result<JoinHandle> {
warn!(error = %e, "RTT session returned an error");
}

let should_recover = (res.is_err() && target_cfg.auto_recover)
let should_recover = (res.is_err() && target_cfg.auto_recover && !interruptor.is_set())
|| (res.is_ok()
&& target_cfg.bootloader
&& target_cfg.auto_recover
Expand Down Expand Up @@ -560,7 +560,7 @@ fn attach_retry_loop(
Ok(rtt) => return Ok(rtt),
Err(e) => {
if matches!(e, Error::Rtt(probe_rs::rtt::Error::ControlBlockNotFound)) {
std::thread::sleep(Duration::from_millis(10));
std::thread::sleep(Duration::from_millis(50));
continue;
}

Expand Down

0 comments on commit db16121

Please sign in to comment.