Skip to content

Commit

Permalink
print warning when low on resources
Browse files Browse the repository at this point in the history
  • Loading branch information
lulf committed Apr 19, 2024
1 parent 244c6be commit f7f9fc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion host/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,10 @@ impl<'d, T: Controller> HciController<'d, T> {

result.map_err(AdapterError::Controller)
}
Poll::Pending => Err(Error::Busy.into()),
Poll::Pending => {
warn!("hci: acl data send busy");
Err(Error::Busy.into())
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion host/src/channel_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,10 @@ impl<

match self.poll_request_to_send(cid, n_packets, None) {
Poll::Ready(res) => res?,
Poll::Pending => return Err(Error::Busy.into()),
Poll::Pending => {
warn!("l2cap: not enough credits for {} packets", n_packets);
return Err(Error::Busy.into());
}
}

// Segment using mps
Expand Down

0 comments on commit f7f9fc1

Please sign in to comment.