diff options
Diffstat (limited to 'nrf-softdevice/src/ble/l2cap.rs')
-rw-r--r-- | nrf-softdevice/src/ble/l2cap.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nrf-softdevice/src/ble/l2cap.rs b/nrf-softdevice/src/ble/l2cap.rs index 33a2baa..ab366e1 100644 --- a/nrf-softdevice/src/ble/l2cap.rs +++ b/nrf-softdevice/src/ble/l2cap.rs @@ -167,6 +167,12 @@ impl<P: Packet> L2cap<P> { raw::BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED => { return Err(SetupError::Disconnected) } + raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RELEASED => { + // It is possible to get L2CAP_EVT_CH_RELEASED for the + // "half-setup" channel if the conn gets disconnected while + // setting it up. + return Err(SetupError::Disconnected); + } raw::BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SETUP => { let l2cap_evt = get_union_field(ble_evt, &(*ble_evt).evt.l2cap_evt); let _evt = &l2cap_evt.params.ch_setup; |