Skip to content

Commit

Permalink
Merge pull request #42 from embassy-rs/channel-closed-handle
Browse files Browse the repository at this point in the history
report channel closed if not found
  • Loading branch information
lulf authored May 21, 2024
2 parents f4a8947 + 11382e0 commit 55c34b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions host/src/channel_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ impl<'d, const RXQ: usize> ChannelManager<'d, RXQ> {
return Ok(idx);
}
}
trace!("[l2cap][connected_channel_index] channel {} not found", cid);
Err(Error::NotFound)
trace!("[l2cap][connected_channel_index] channel {} closed", cid);
Err(Error::ChannelClosed)
}

async fn receive_pdu<T: Controller>(
Expand Down Expand Up @@ -621,8 +621,8 @@ impl<'d, const RXQ: usize> ChannelManager<'d, RXQ> {
_ => {}
}
}
trace!("[l2cap][connected_channel_params] channel {} not found", cid);
Err(Error::NotFound)
trace!("[l2cap][connected_channel_params] channel {} closed", cid);
Err(Error::ChannelClosed)
}

// Check the current state of flow control and send flow indications if
Expand Down

0 comments on commit 55c34b4

Please sign in to comment.