Skip to content

Commit

Permalink
[Telink] Fixed hanging on BLE Shutdown (TC-SC-4.1) (#30152)
Browse files Browse the repository at this point in the history
* [Telink] Fixed hanging on BLE Shutdown (TC-SC-4.1)

Refactored BLE shutdown condition to pass test TC-SC-4.1.
Device would become stuck at scheduler routines after open-basic-commissioning-window time expires.

Signed-off-by: Dmytro Huz  <[email protected]>

* Restyled by clang-format

---------

Signed-off-by: Dmytro Huz  <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Nov 27, 2023
1 parent 63e7b07 commit 4406416
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/platform/telink/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ CHIP_ERROR BLEManagerImpl::_Init(void)

void BLEManagerImpl::_Shutdown()
{
bt_disable();
mBLERadioInitialized = false;
if (mBLERadioInitialized)
{
bt_disable();
mBLERadioInitialized = false;
}
}

void BLEManagerImpl::DriveBLEState(intptr_t arg)
Expand Down

0 comments on commit 4406416

Please sign in to comment.