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  <dmytro.huz@telink-semi.com>

* Restyled by clang-format

---------

Signed-off-by: Dmytro Huz  <dmytro.huz@telink-semi.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Nov 17, 2023
1 parent f82f609 commit 13fffe9
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 13fffe9

Please sign in to comment.