Skip to content

Commit

Permalink
fix: do not exit runner on non-critical errors
Browse files Browse the repository at this point in the history
Connection handles may be marked as disconnected before the runner
has a chance to send responses to it. In that case, log and ignore error.

Fixes #277
  • Loading branch information
lulf committed Jan 30, 2025
1 parent b1671f1 commit 7700932
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions host/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,12 @@ impl<'d, C: Controller> TxRunner<'d, C> {
return Err(e);
}
}
Err(BleHostError::BleHost(Error::NotFound)) => {
warn!("[host] unable to send data to disconnected host (ignored)");
}
Err(BleHostError::BleHost(Error::Disconnected)) => {
warn!("[host] unable to send data to disconnected host (ignored)");
}
Err(e) => {
warn!("[host] error requesting sending outbound pdu");
return Err(e);
Expand Down

0 comments on commit 7700932

Please sign in to comment.