Skip to content

Commit 1411294

Browse files
interferrestyled-commits
authored andcommitted
[Telink] Fixed hanging on BLE Shutdown (TC-SC-4.1) (#30152)
* [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>
1 parent 3d14a28 commit 1411294

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/platform/telink/BLEManagerImpl.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,11 @@ CHIP_ERROR BLEManagerImpl::_Init(void)
180180

181181
void BLEManagerImpl::_Shutdown()
182182
{
183-
bt_disable();
184-
mBLERadioInitialized = false;
183+
if (mBLERadioInitialized)
184+
{
185+
bt_disable();
186+
mBLERadioInitialized = false;
187+
}
185188
}
186189

187190
void BLEManagerImpl::DriveBLEState(intptr_t arg)

0 commit comments

Comments
 (0)